User:Mathglot/sandbox/Templates/xlabel
Appearance
06-01
Documentation
Given a date label like 2024-06-01, adjust/shortens it; by default to mm-dd. Optionally bolds the first of every month.
Usage
{{xlabel|yyy-mm-dd}}
Parameters
|1=
– date, in the format used by line 1 of the pageviews tool download file; currently YYYY-MM-DD.
|bold01=
– boolean; if present, any date ending in '-01' is bolded; others are not. (optional: default: no bold)
Examples
{{xlabel|2024-06-01}}
⟶ 06-01{{xlabel|2024-11-23}}
⟶ 11-23{{xlabel|2024-06-01|bold01=y}}
⟶ 06-01{{xlabel|2024-11-23|bold01=y}}
⟶ 11-23
Notes
Future enhancements envisaged, to turn it into 01 Jun
, etc., under parameteric control.