EndOfTheWeek function
Calculate a TDateTime value which represents the end of a week, given a date in that week.
Declaration
function EndOfTheWeek(const AValue: TDateTime): TDateTimeArguments
AValue | Day in the week of which the last day should be calculated. |
Function result
TDateTime value representing the last day of the week in which
AVAlue is a day.
Description
EndOfTheWeek extracts the year and week parts of
AValue and
returns a
TDateTime value with the date of the last day of that
week as the
EndOfAWeek function.See also
Example: ex33
Program Example33;
{ This program demonstrates the EndOfTheWeek function }
Uses SysUtils,DateUtils;
Const
Fmt = '"last day of this week : "dd mmmm yyyy';
Begin
Writeln(FormatDateTime(Fmt,EndOfTheWeek(Today)));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
