System.DateUtils.IsValidDate
Delphi
function IsValidDate(const AYear, AMonth, ADay: Word): Boolean;
C++
extern DELPHI_PACKAGE bool __fastcall IsValidDate(const System::Word AYear, const System::Word AMonth, const System::Word ADay);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.DateUtils.pas System.DateUtils.hpp |
System.DateUtils | System.DateUtils |
Description
Indicates whether a specified year, month, and day represent a valid date.
IsValidDate returns True if:
- AYear falls in the range from 1 through 9999 inclusive.
- AMonth falls in the range from 1 through 12 inclusive.
- ADay falls in the range from 1 through the number of days in the specified month.
Otherwise, IsValidDate returns False.
See Also