mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-06 08:29:23 +01:00
17 lines
323 B
ObjectPascal
17 lines
323 B
ObjectPascal
Program Example82;
|
|
|
|
{ This program demonstrates the TryEncodeDateWeek function }
|
|
|
|
Uses SysUtils,DateUtils;
|
|
|
|
Var
|
|
Y,W,Dow : Word;
|
|
TS : TDateTime;
|
|
|
|
Begin
|
|
DecodeDateWeek(Now,Y,W,Dow);
|
|
If TryEncodeDateWeek(Y,W,TS,Dow) then
|
|
Writeln('Today is : ',DateToStr(TS))
|
|
else
|
|
Writeln('Invalid date/week indication');
|
|
End. |