Returns the number of days in the month of a Gregorian calendars.
<span align="right" style="background-color:9999FF"><strong>Open Office: DAYSINMONTH</strong></span>
These functions are available for Microsoft Excel (Login to download):
Integer
cc_daysInMonth (Integer year, Integer month)
Use the following HTML code to embed the calculators within other websites:
DaysInMonth
intdaysInMonth(
int
year
int
month
)
Returns the number of days in the months of a Gregorian calendar for the month of year. The year is used to apply adjustments for leap years.
Each month has a fixed number of days, except in a leap year, when February gains an extra day. Although we traditionally treat the 29th February as the leap day, a left over remnant of the Roman calendar means that the theoretical leap day occurs on the 24th February - many celebrations occur on this day for this reason.
The number of days in each month of the Gregorian / Julian calendar are:
<div style="margin-left:100">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td width="100"> January</td><td width="50">31</td></tr>
<tr><td> February</td><td>28/29</td></tr>
<tr><td> March</td><td>31</td></tr>
<tr><td> April</td><td>30</td></tr>
<tr><td> May</td><td>31</td></tr>
<tr><td> June</td><td>30</td></tr>
<tr><td> July</td><td>31</td></tr>
<tr><td> August</td><td>31</td></tr>
<tr><td> September</td><td>30</td></tr>
<tr><td> October</td><td>31</td></tr>
<tr><td> November</td><td>30</td></tr>
<tr><td> December</td><td>31</td></tr>
</tr>
</table>
</div>
Example 1
To output the number of days in each month of 1974