Template:Hexmonth/doc: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with "{{Documentation}} Converts a month name (short like "Jan" or in full like "January") into a hex number. Used for sorting dates chronologically. ==Usage== {{T|Hexmonth|month}} {| class="wikitable" ! Wikitext ! Result |- | <syntaxhighlight lang="wikitext" inline>{{Hexmonth|January}}</syntaxhighlight> | {{Hexmonth|January}} |- | <syntaxhighlight lang="wikitext" inline>{{Hexmonth|February}}</syntaxhighlight> | {{Hexmonth|February}} |- | <syntaxhighlight lang="wikitext" in...") |
(Note how to get month easily) |
||
Line 2: | Line 2: | ||
Converts a month name (short like "Jan" or in full like "January") into a hex number. Used for sorting dates chronologically. |
Converts a month name (short like "Jan" or in full like "January") into a hex number. Used for sorting dates chronologically. |
||
To convert from a timestamp, use <syntaxhighlight lang="wikitext" inline>{{Hexmonth|{{#time:F|<datetime>}}}}</syntaxhighlight>. For example, <syntaxhighlight lang="wikitext" inline>{{Hexmonth|{{#time:F|{{REVISIONTIMESTAMP}}}}}}</syntaxhighlight> results in {{Hexmonth|{{#time:F|{{REVISIONTIMESTAMP}}}}}}. |
|||
==Usage== |
==Usage== |
Latest revision as of 17:13, 30 December 2024
Converts a month name (short like "Jan" or in full like "January") into a hex number. Used for sorting dates chronologically.
To convert from a timestamp, use {{Hexmonth|{{#time:F|<datetime>}}}}
. For example, {{Hexmonth|{{#time:F|{{REVISIONTIMESTAMP}}}}}}
results in C.
Usage
{{Hexmonth|month}}
Wikitext | Result |
---|---|
{{Hexmonth|January}}
|
1 |
{{Hexmonth|February}}
|
2 |
{{Hexmonth|March}}
|
3 |
{{Hexmonth|April}}
|
4 |
{{Hexmonth|May}}
|
5 |
{{Hexmonth|June}}
|
6 |
{{Hexmonth|July}}
|
7 |
{{Hexmonth|August}}
|
8 |
{{Hexmonth|September}}
|
9 |
{{Hexmonth|October}}
|
A |
{{Hexmonth|November}}
|
B |
{{Hexmonth|December}}
|
C |