From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function IsValidDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word): Boolean;


extern DELPHI_PACKAGE bool __fastcall IsValidDateMonthWeek(const System::Word AYear, const System::Word AMonth, const System::Word AWeekOfMonth, const System::Word ADayOfWeek);


Type Visibility Source Unit Parent
function public
System.DateUtils System.DateUtils


Indicates whether a specified year, month, week of the month, and day of the week represent a valid date.

IsValidDateMonthWeek returns True if:

  • AYear falls in the range from 1 through 9999 inclusive.
  • AMonth falls in the range from 1 through 12 inclusive.
  • AWeekOfMonth falls in the range from 1 through the number of weeks in the specified month.
  • ADayOfWeek falls in the range from 1 through 7.

Otherwise, IsValidDateMonthWeek returns False.

See Also

Code Examples