SmartPascal
DaysInAMonth
Function
Gives the number of days in a month DateUtils unit
 function DaysInAMonth ( const Year, Month : Word ) : Word;
Description
The DaysInAMonth function gives the number of days in a given Year and Month.
Related commands
DaysBetween Gives the whole number of days between 2 dates
DaysInAYear Gives the number of days in a year
DaySpan Gives the fractional number of days between 2 dates
MinsPerDay Gives the number of minutes in a day
MonthDays Gives the number of days in a month
SecsPerDay Gives the number of seconds in a day
 
Example code : How many days in February 2000 ?
begin
  // How many days in February 2000 ?
  ShowMessage('Days in February 2000 = '+
              IntToStr(DaysInAMonth(2000, 2)));
end;
Show full unit code
   Days in February 2000 = 29