Template:Hexmonth

From Brighter Shores Wiki
Revision as of 15:43, 30 December 2024 by Artoire (talk | contribs) (Created page with "<includeonly>{{#switch:{{lc:{{{1}}}}} |1|01|jan|january=1 |2|02|feb|february=2 |3|03|mar|march=3 |4|04|apr|april=4 |5|05|may=5 |6|06|jun|june=6 |7|07|jul|july=7 |8|08|aug|august=8 |9|09|sep|september=9 |10|oct|october=A |11|nov|november=B |12|dec|december=C}}</includeonly><noinclude>{{/doc}}</noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Template documentation
This documentation is transcluded from Template:Hexmonth/doc. [edit] [history] [purge]

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