Gender Wiki

This template returns the cyclic integer month number (between 1 and 12) of the month whose real number is in parameter. Alternatively, the month can be given with its English name (complete or abbreviated to 3 characters, with capitals or small letters). Wikipedia doesn't appear to have a redirect to {{MONTHNUMBER}}.

Does not play nicely with "subst:"

Syntax:
{{Monthnumber|month}}
  • The month value is interpreted modulo 12 (extra leading zeroes are ignored, negative numbers are accepted, all numbers are rounded to floor).
Compatibility synonym:
{{MONTHNUMBER|month}}
Examples for all standard English month names:
{{Monthnumber|january}} returns 1
{{Monthnumber|february}} returns 2
{{Monthnumber|march}} returns 3
{{Monthnumber|april}} returns 4
{{Monthnumber|may}} returns 5
{{Monthnumber|june}} returns 6
{{Monthnumber|july}} returns 7
{{Monthnumber|august}} returns 8
{{Monthnumber|september}} returns 9
{{Monthnumber|october}} returns 10
{{Monthnumber|november}} returns 11
{{Monthnumber|december}} returns 12
Examples for all abbreviated English month names:
{{Monthnumber|jan}} returns 1
{{Monthnumber|feb}} returns 2
{{Monthnumber|mar}} returns 3
{{Monthnumber|apr}} returns 4
{{Monthnumber|may}} returns 5
{{Monthnumber|jun}} returns 6
{{Monthnumber|jul}} returns 7
{{Monthnumber|aug}} returns 8
{{Monthnumber|sep}} returns 9
{{Monthnumber|oct}} returns 10
{{Monthnumber|nov}} returns 11
{{Monthnumber|dec}} returns 12
Examples for all standard month numbers:
{{Monthnumber|1}} returns 1
{{Monthnumber|2}} returns 2
{{Monthnumber|3}} returns 3
{{Monthnumber|4}} returns 4
{{Monthnumber|5}} returns 5
{{Monthnumber|6}} returns 6
{{Monthnumber|7}} returns 7
{{Monthnumber|8}} returns 8
{{Monthnumber|9}} returns 9
{{Monthnumber|10}} returns 10
{{Monthnumber|11}} returns 11
{{Monthnumber|12}} returns 12
Examples for month numbers with extra leading zero:
{{Monthnumber|01}} returns 1
{{Monthnumber|02}} returns 2
{{Monthnumber|03}} returns 3
{{Monthnumber|04}} returns 4
{{Monthnumber|05}} returns 5
{{Monthnumber|06}} returns 6
{{Monthnumber|07}} returns 7
{{Monthnumber|08}} returns 8
{{Monthnumber|09}} returns 9
Examples for month number underflows and overflows, from computed values:
{{Monthnumber|-1200}} returns 12
{{Monthnumber|-1201}} returns 11
{{Monthnumber|-1212}} returns 12
{{Monthnumber|-12}} returns 12
{{Monthnumber|-11}} returns 1
{{Monthnumber|-10}} returns 2
{{Monthnumber|-9}} returns 3
{{Monthnumber|-8}} returns 4
{{Monthnumber|-7}} returns 5
{{Monthnumber|-6}} returns 6
{{Monthnumber|-5}} returns 7
{{Monthnumber|-4}} returns 8
{{Monthnumber|-3}} returns 9
{{Monthnumber|-2}} returns 10
{{Monthnumber|-1}} returns 11
{{Monthnumber|-0.9999}} returns 11
{{Monthnumber|-0.5}} returns 11
{{Monthnumber|-0.0001}} returns 11
{{Monthnumber|0}} returns 12
{{Monthnumber|0.0001}} returns 12
{{Monthnumber|0.5}} returns 12
{{Monthnumber|0.9999}} returns 12
{{Monthnumber|12.0001}} returns 12
{{Monthnumber|12.5}} returns 12
{{Monthnumber|12.9999}} returns 12
{{Monthnumber|13}} returns 1
{{Monthnumber|14}} returns 2
{{Monthnumber|24}} returns 12
{{Monthnumber|1200}} returns 12
{{Monthnumber|1201}} returns 1
{{Monthnumber|1212}} returns 12
Example for invalid month name:
{{Monthnumber|xxx}} returns Expression error: Unrecognized word "xxx".

See also