Function Reference


Returns the number of days in a month, based on the specified month and year

#include <Date.au3>
_DateDaysInMonth ( $iYear, $iMonthNum )


$iYear 4-digit year.
$iMonthNum Month number (1 = January, 12 = December).

Return Value

Success: the number of days in the month.
Failure: 0 and sets the @error flag to non-zero.
@error: 1 - Invalid month number or year.




#include <Date.au3>
#include <MsgBoxConstants.au3>

Local $iDays = _DateDaysInMonth(@YEAR, @MON)
MsgBox($MB_SYSTEMMODAL, "Days in Month", "This month has " & String($iDays) & " days in it.")