System.DateUtils.EndOfAWeek
Delphi
function EndOfAWeek(const AYear, AWeekOfYear, ADayOfWeek: Word): TDateTime;
C++
extern DELPHI_PACKAGE System::TDateTime __fastcall EndOfAWeek(const System::Word AYear, const System::Word AWeekOfYear, const System::Word ADayOfWeek = (System::Word)(0x7));
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.DateUtils.pas System.DateUtils.hpp |
System.DateUtils | System.DateUtils |
Description
Returns a TDateTime object value that represents the last millisecond of a specified day of a specified week.
EndOfAWeek returns the last expressible moment (11:59:59.999 P.M.) of the specified day of the specified week.
The AYear parameter specifies the year of the desired day.
The AWeekOfYear parameter specifies the week of the year, where 1 is the first week in AYear that includes four or more days.
The ADayOfWeek parameter indicates the desired day in the specified week, where 1 is Monday, 2 is Tuesday, and so on.
Tip: To make the ADayOfWeek value more readable, use the day of week constants.
If the parameters do not specify a valid date, EndOfAWeek raises an EConvertError exception.
Note: The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.
See Also