System.DateUtils.EndOfTheWeek
Delphi
function EndOfTheWeek(const AValue: TDateTime): TDateTime;
C++
extern DELPHI_PACKAGE System::TDateTime __fastcall EndOfTheWeek(const System::TDateTime AValue);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.DateUtils.pas System.DateUtils.hpp |
System.DateUtils | System.DateUtils |
Description
Returns a TDateTime that represents the last millisecond of the last day of the week identified by a specified TDateTime.
EndOfTheWeek returns the last expressible moment of the same week as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 11:59:59.999 P.M., changes the day to the last day of the week, and returns the result.
Note: EndOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.
See Also