mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-05 15:49:26 +01:00
15 lines
356 B
ObjectPascal
15 lines
356 B
ObjectPascal
Program Example105;
|
|
|
|
{ This program demonstrates the DecodeDayOfWeekInMonth function }
|
|
|
|
Uses SysUtils,DateUtils;
|
|
|
|
Var
|
|
Y,M,NDoW,DoW : Word;
|
|
D : TDateTime;
|
|
Begin
|
|
DecodeDayOfWeekInMonth(Date,Y,M,NDoW,DoW);
|
|
D:=EncodeDayOfWeekInMonth(Y,M,NDoW,DoW);
|
|
Write(DateToStr(D),' is the ',NDow,'-th ');
|
|
Writeln(formatdateTime('dddd',D),' of the month.');
|
|
End. |