Template:MONTHDAYS

From Nordic Larp Wiki
Jump to navigation Jump to search

31

Template documentation[view] [edit] [history] [purge]

This template computes the number of days for the month of year in parameter.

Syntax

{{MONTHDAYS|year|month}}

Examples for all months of a leap year

{{MONTHDAYS|2000|1}} returns 31
{{MONTHDAYS|2000|2}} returns 29
{{MONTHDAYS|2000|3}} returns 31
{{MONTHDAYS|2000|4}} returns 30
{{MONTHDAYS|2000|5}} returns 31
{{MONTHDAYS|2000|6}} returns 30
{{MONTHDAYS|2000|7}} returns 31
{{MONTHDAYS|2000|8}} returns 31
{{MONTHDAYS|2000|9}} returns 30
{{MONTHDAYS|2000|10}} returns 31
{{MONTHDAYS|2000|11}} returns 30
{{MONTHDAYS|2000|12}} returns 31

Examples for all months of a non-leap year

{{MONTHDAYS|2001|1}} returns 31
{{MONTHDAYS|2001|2}} returns 28
{{MONTHDAYS|2001|3}} returns 31
{{MONTHDAYS|2001|4}} returns 30
{{MONTHDAYS|2001|5}} returns 31
{{MONTHDAYS|2001|6}} returns 30
{{MONTHDAYS|2001|7}} returns 31
{{MONTHDAYS|2001|8}} returns 31
{{MONTHDAYS|2001|9}} returns 30
{{MONTHDAYS|2001|10}} returns 31
{{MONTHDAYS|2001|11}} returns 30
{{MONTHDAYS|2001|12}} returns 31

Examples for the February month on some near years

{{MONTHDAYS|1901|2}} returns 28
{{MONTHDAYS|1904|2}} returns 29
{{MONTHDAYS|1992|2}} returns 29
{{MONTHDAYS|1996|2}} returns 29
{{MONTHDAYS|1999|2}} returns 28
{{MONTHDAYS|2000|2}} returns 29
{{MONTHDAYS|2001|2}} returns 28
{{MONTHDAYS|2002|2}} returns 28
{{MONTHDAYS|2003|2}} returns 28
{{MONTHDAYS|2004|2}} returns 29
{{MONTHDAYS|2005|2}} returns 28
{{MONTHDAYS|2006|2}} returns 28
{{MONTHDAYS|2007|2}} returns 28
{{MONTHDAYS|2008|2}} returns 29
{{MONTHDAYS|2012|2}} returns 29
{{MONTHDAYS|2099|2}} returns 28

Examples for the February month on some secular years

{{MONTHDAYS|1600|2}} returns 29
{{MONTHDAYS|1700|2}} returns 28
{{MONTHDAYS|1800|2}} returns 28
{{MONTHDAYS|1900|2}} returns 28
{{MONTHDAYS|2000|2}} returns 29
{{MONTHDAYS|2100|2}} returns 28
{{MONTHDAYS|2200|2}} returns 28
{{MONTHDAYS|2300|2}} returns 28
{{MONTHDAYS|2400|2}} returns 29

See also

Template:YEARCC
Template:YEARYY
Template:CENTURY
Template:IsLeapYear
Template:JULIANDAY
Template:WEEKDAY
Template:CURRENTMONTHDAYS