Template:MONTHDAYS

From OrthodoxWiki

Jump to: navigation, search

{{#ifexpr:|{{#switch:{{#expr:-0.5 round 0}}|1=31|2={{#ifexpr:|{{#ifeq:{{#expr: ((() mod 4 = 0) and (() mod 100 != 0)) or (() mod 400 = 0)}} |1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

Documentation

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 {{#ifexpr:1|{{#switch:{{#expr:1-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|3}} returns {{#ifexpr:3|{{#switch:{{#expr:3-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|4}} returns {{#ifexpr:4|{{#switch:{{#expr:4-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|5}} returns {{#ifexpr:5|{{#switch:{{#expr:5-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|6}} returns {{#ifexpr:6|{{#switch:{{#expr:6-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|7}} returns {{#ifexpr:7|{{#switch:{{#expr:7-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|8}} returns {{#ifexpr:8|{{#switch:{{#expr:8-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|9}} returns {{#ifexpr:9|{{#switch:{{#expr:9-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|10}} returns {{#ifexpr:10|{{#switch:{{#expr:10-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|11}} returns {{#ifexpr:11|{{#switch:{{#expr:11-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|12}} returns {{#ifexpr:12|{{#switch:{{#expr:12-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}


Examples for all months of a non-leap year:
{{MONTHDAYS|2001|1}} returns {{#ifexpr:1|{{#switch:{{#expr:1-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|3}} returns {{#ifexpr:3|{{#switch:{{#expr:3-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|4}} returns {{#ifexpr:4|{{#switch:{{#expr:4-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|5}} returns {{#ifexpr:5|{{#switch:{{#expr:5-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|6}} returns {{#ifexpr:6|{{#switch:{{#expr:6-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|7}} returns {{#ifexpr:7|{{#switch:{{#expr:7-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|8}} returns {{#ifexpr:8|{{#switch:{{#expr:8-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|9}} returns {{#ifexpr:9|{{#switch:{{#expr:9-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|10}} returns {{#ifexpr:10|{{#switch:{{#expr:10-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|11}} returns {{#ifexpr:11|{{#switch:{{#expr:11-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|12}} returns {{#ifexpr:12|{{#switch:{{#expr:12-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}


Examples for the February month on some near years:
{{MONTHDAYS|1901|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1901|{{#ifeq:{{#expr: (((1901) mod 4 = 0) and ((1901) mod 100 != 0)) or ((1901) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|1904|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1904|{{#ifeq:{{#expr: (((1904) mod 4 = 0) and ((1904) mod 100 != 0)) or ((1904) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|1992|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1992|{{#ifeq:{{#expr: (((1992) mod 4 = 0) and ((1992) mod 100 != 0)) or ((1992) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|1996|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1996|{{#ifeq:{{#expr: (((1996) mod 4 = 0) and ((1996) mod 100 != 0)) or ((1996) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|1999|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1999|{{#ifeq:{{#expr: (((1999) mod 4 = 0) and ((1999) mod 100 != 0)) or ((1999) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2001|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2001|{{#ifeq:{{#expr: (((2001) mod 4 = 0) and ((2001) mod 100 != 0)) or ((2001) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2002|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2002|{{#ifeq:{{#expr: (((2002) mod 4 = 0) and ((2002) mod 100 != 0)) or ((2002) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2003|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2003|{{#ifeq:{{#expr: (((2003) mod 4 = 0) and ((2003) mod 100 != 0)) or ((2003) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2004|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2004|{{#ifeq:{{#expr: (((2004) mod 4 = 0) and ((2004) mod 100 != 0)) or ((2004) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2005|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2005|{{#ifeq:{{#expr: (((2005) mod 4 = 0) and ((2005) mod 100 != 0)) or ((2005) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2006|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2006|{{#ifeq:{{#expr: (((2006) mod 4 = 0) and ((2006) mod 100 != 0)) or ((2006) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2007|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2007|{{#ifeq:{{#expr: (((2007) mod 4 = 0) and ((2007) mod 100 != 0)) or ((2007) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2008|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2008|{{#ifeq:{{#expr: (((2008) mod 4 = 0) and ((2008) mod 100 != 0)) or ((2008) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2012|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2012|{{#ifeq:{{#expr: (((2012) mod 4 = 0) and ((2012) mod 100 != 0)) or ((2012) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2099|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2099|{{#ifeq:{{#expr: (((2099) mod 4 = 0) and ((2099) mod 100 != 0)) or ((2099) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}


Examples for the February month on some secular years:
{{MONTHDAYS|1600|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1600|{{#ifeq:{{#expr: (((1600) mod 4 = 0) and ((1600) mod 100 != 0)) or ((1600) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|1700|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1700|{{#ifeq:{{#expr: (((1700) mod 4 = 0) and ((1700) mod 100 != 0)) or ((1700) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|1800|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1800|{{#ifeq:{{#expr: (((1800) mod 4 = 0) and ((1800) mod 100 != 0)) or ((1800) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|1900|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:1900|{{#ifeq:{{#expr: (((1900) mod 4 = 0) and ((1900) mod 100 != 0)) or ((1900) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2000|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2000|{{#ifeq:{{#expr: (((2000) mod 4 = 0) and ((2000) mod 100 != 0)) or ((2000) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2100|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2100|{{#ifeq:{{#expr: (((2100) mod 4 = 0) and ((2100) mod 100 != 0)) or ((2100) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2200|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2200|{{#ifeq:{{#expr: (((2200) mod 4 = 0) and ((2200) mod 100 != 0)) or ((2200) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2300|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2300|{{#ifeq:{{#expr: (((2300) mod 4 = 0) and ((2300) mod 100 != 0)) or ((2300) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

{{MONTHDAYS|2400|2}} returns {{#ifexpr:2|{{#switch:{{#expr:2-0.5 round 0}}|1=31|2={{#ifexpr:2400|{{#ifeq:{{#expr: (((2400) mod 4 = 0) and ((2400) mod 100 != 0)) or ((2400) mod 400 = 0)}}

|1|29|28}}|Missing or incorrect required parameter 1=year!}}|3=31|4=30|5=31|6=30|7=31|8=31|9=30|10=31|11=30|12=31|Incorrect required parameter 2=month!}}|Missing required parameter 2=month!}}

Personal tools
pan-wiki Google Search