mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 10:09:31 +01:00
19 lines
404 B
ObjectPascal
19 lines
404 B
ObjectPascal
Program Example34;
|
|
|
|
{ This program demonstrates the StartOfAWeek function }
|
|
|
|
Uses SysUtils,DateUtils;
|
|
|
|
Const
|
|
Fmt = '"First day of this week : "dd mmmm yyyy hh:nn:ss';
|
|
Fmt2 = '"Second day of this week : "dd mmmm yyyy hh:nn:ss';
|
|
|
|
Var
|
|
Y,W : Word;
|
|
|
|
Begin
|
|
Y:=YearOf(Today);
|
|
W:=WeekOf(Today);
|
|
Writeln(FormatDateTime(Fmt,StartOfAWeek(Y,W)));
|
|
Writeln(FormatDateTime(Fmt2,StartOfAWeek(Y,W,2)));
|
|
End. |