Template:MONTHNUMBER: Difference between revisions

From Geometry Dash Expanded Wiki
Jump to navigation Jump to search
Created page with "<includeonly>{{#if:{{{1|}}} |{{#switch:{{lc:{{{1}}}}} |january|jan=1 |february|feb=2 |march|mar=3 |apr|april=4 |may=5 |june|jun=6 |july|jul=7 |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}}..."
 
Fix date formatting, validate calendar dates and calculate completed age
 
(2 intermediate revisions by one other user not shown)
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