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