StartOfTheWeek function
Return the first day of the week, given a date.
Declaration
function StartOfTheWeek(const AValue: TDateTime): TDateTimeArguments
AValue | Day in the week. |
Function result
First day of the week, in
TDateTime format.
Description
StartOfTheWeek extracts the year and week parts of
AValue and
returns a
TDateTime value with the date of the first day of that
week as the
StartOfAWeek function.See also
Example: ex32
Program Example32;
{ This program demonstrates the StartOfTheWeek function }
Uses SysUtils,DateUtils;
Const
Fmt = '"First day of this week : "dd mmmm yyyy';
Begin
Writeln(FormatDateTime(Fmt,StartOfTheWeek(Today)));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
