System.DateUtils.IsValidDateWeek

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsValidDateWeek(const AYear, AWeekOfYear, ADayOfWeek: Word): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall IsValidDateWeek(const System::Word AYear, const System::Word AWeekOfYear, const System::Word ADayOfWeek);

Properties

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

Description

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

IsValidDateWeek returns true if:

  • AYear falls in the range from 1 through 9999 inclusive.
  • AWeekOfYear falls in the range from 1 through the number of weeks in the specified year.
  • ADayOfWeek falls in the range from 1 through 7.

Otherwise, IsValidDateWeek returns False.

See Also


Code Examples