Template:Days in month: Difference between revisions
Jump to navigation
Jump to search
(try again) |
(nice.) |
||
Line 1: | Line 1: | ||
{{#switch: |
{{#switch:{{{month|{{CURRENTMONTH}}}}|4|6|9|11=30|2={{#switch:{{IsLeapYear|{{{year|{{CURRENTYEAR}}}}}}}|1=29|28}}|#default=31}}<!-- |
||
--><noinclude> |
--><noinclude> |
||
Line 8: | Line 8: | ||
: month {{CURRENTMONTH}} year {{CURRENTYEAR}} |
: month {{CURRENTMONTH}} year {{CURRENTYEAR}} |
||
: current : {{{month|{{CURRENTMONTH}}}} |
|||
:vanilla switch {{#switch:01|2|3|4=5|1=6|#default=35}} |
:vanilla switch {{#switch:01|2|3|4=5|1=6|#default=35}} |
||
:isleapyear {{IsLeapYear|{{{year|{{CURRENTYEAR}}}}}}} |
:isleapyear {{IsLeapYear|{{{year|{{CURRENTYEAR}}}}}}} |
||
:ifcheck {{#ifexpr:1|1|2}} |
:ifcheck {{#ifexpr:1|1|2}} |
||
:leapcheck {{#switch:{{IsLeapYear|{{{year|{{CURRENTYEAR}}}}}}}|1=29|28}} |
:leapcheck {{#switch:{{IsLeapYear|{{{year|{{CURRENTYEAR}}}}}}}|1=29|28}} |
||
:switch new {{#switch:{{{month|{{CURRENTMONTH}}}}}|4|6|9|11=30|2={{# |
:switch new {{#switch:{{{month|{{CURRENTMONTH}}}}}|4|6|9|11=30|2={{#switch:{{IsLeapYear|{{{year|{{CURRENTYEAR}}}}}}}|1=29|28}}|#default=31}} |
||
Revision as of 04:01, 10 February 2008
31
Takes a month and year and returns the # of days in the month. Assumes current date if none is given. Currently broken, since the switch isn't working.
- month 11 year 2024
- current : {Template:Month
- vanilla switch 6
- isleapyear 1
- ifcheck 1
- leapcheck 28
- switch new 30
See also Template:Age calculator and Template:IsLeapYear.