Check whether a set of values is a valid date indication.
Source position: dateutil.inc line 107
function IsValidDate( |
const AYear: Word; |
const AMonth: Word; |
const ADay: Word |
):Boolean; |
AYear |
|
Year value. |
AMonth |
|
Month in the year. |
ADay |
|
Day in the month. |
True if the given values form a valid date, False if not.
IsValidDate returns True when the values AYear, AMonth, ADay form a valid date indication. If one of the values is not valid (e.g. the day is invalid or does not exist in that particular month), False is returned.
AYear must be in the range 1..9999 to be valid.
|
Check whether a set of values is a valid time indication. |
|
|
Check whether a set of values is a valid date and time indication. |
|
|
Check whether a given year/day of year combination is a valid date. |
|
|
Check whether a given year/week/day of the week combination is a valid day. |
|
|
Check whether a given year/month/week/day of the week combination is a valid day. |
Program Example5; { This program demonstrates the IsValidDate function } Uses SysUtils,DateUtils; Var Y,M,D : Word; Begin For Y:=2000 to 2004 do For M:=1 to 12 do For D:=1 to 31 do If Not IsValidDate(Y,M,D) then Writeln(D,' is not a valid day in ',Y,'/',M); End.