GetMonthLength (open)

Returns the number of days in a specific month in a specific year

Syntax

LOADLIB "wh::datetime.whlib";

INTEGER FUNCTION GetMonthLength(INTEGER month, INTEGER year)

Parameters

INTEGER month

The month of which the number of days should be returned. Januari = 1, Februari = 2 etc.

INTEGER year

The year the month belongs to.

Return value

INTEGER

The total number of days in the month, taking leap years into account.

Examples

// Returns the number of days in Februari 1997
INTEGER MonthLength := GetMonthLength(2,1997);