DecodeDateWeek procedure
Decode a TDateTime value in a week of year and day of week.
Declaration
procedure DecodeDateWeek(const AValue: TDateTime; out AYear: Word;
out AWeekOfYear: Word; out ADayOfWeek: Word)Arguments
AValue | TDateTime to decode. |
AYear | Returns the year part of
|
AWeekOfYear | Returns the week of year part of
|
ADayOfWeek | Returns the day of week part of
|
Description
DecodeDateWeek decomposes the date indication in
AValue and returns the various components in
AYear,
AWeekOfYear,
ADayOfWeek.See also
- EncodeDateTime
- EncodeDateMonthWeek
- EncodeDateWeek
- EncodeDateDay
- DecodeDateTime
- DecodeDateDay
- DecodeDateMonthWeek
Example: ex81
Program Example81;
{ This program demonstrates the DecodeDateWeek function }
Uses SysUtils,DateUtils;
Var
Y,W,Dow : Word;
TS : TDateTime;
Begin
DecodeDateWeek(Now,Y,W,Dow);
TS:=EncodeDateWeek(Y,W,Dow);
Writeln('Today is : ',DateToStr(TS));
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
