mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-26 12:18:20 +02:00
17 lines
325 B
ObjectPascal
17 lines
325 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. |