Template:MONTHNUMBER: Difference between revisions

From Geometry Dash Expanded Wiki
Jump to navigation Jump to search
Undid revision 113448 by Rexster930 (talk)
Tag: Undo
Fix date formatting, validate calendar dates and calculate completed age
 
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}
<includeonly>{{#invoke:Expanded dates|monthnumber}}</includeonly><noinclude>
|{{#switch:{{lc:{{{1}}}}}
;Description
  |january|jan=1
:Returns a month number from 1 to 12. Accepts leading zeros, English month names and abbreviations, without regard to case.
  |february|feb=2
;Syntax
  |march|mar=3
:{{t|MONTHNUMBER|month}}
  |apr|april=4
;Example
  |may=5
:{{MONTHNUMBER|February}}
  |june|jun=6
[[Category:General templates]]
  |july|jul=7
</noinclude>
  |august|aug=8
  |september|sep|sept=9
  |october|oct=10
  |november|nov=11
  |december|dec=12
  |{{#ifexpr:{{{1}}}<0
  |{{#ifexpr:(({{{1}}})round 0)!=({{{1}}})
    |{{#expr:12-(((0.5-({{{1}}}))round 0)mod 12)}}
    |{{#expr:12-(((11.5-({{{1}}}))round 0)mod 12)}}
  }}
  |{{#expr:(((10.5+{{{1}}})round 0)mod 12)+1}}
  }}
}}
|Missing required parameter 1=''month''!
}}
</includeonly>

Latest revision as of 03:03, 12 October 2026

Description
Returns a month number from 1 to 12. Accepts leading zeros, English month names and abbreviations, without regard to case.
Syntax
{{MONTHNUMBER|<month>}}
Example
2