fpc/docs/datutex/ex105.pp
2004-12-30 13:30:23 +00:00

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.