procedure DecodeDateMonthWeek(const AValue: TDateTime; out AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word);
extern DELPHI_PACKAGE void __fastcall DecodeDateMonthWeek(const System::TDateTime AValue, /* out */ System::Word &AYear, /* out */ System::Word &AMonth, /* out */ System::Word &AWeekOfMonth, /* out */ System::Word &ADayOfWeek);
Returns the year, month, week of the month, and day of the week for a specified TDateTime.
DecodeDateMonthWeek returns the day of the week and week of the month for a specified date/time value, along with the month and year in which that day and week occur.
AValue is the date/time value about which you want information.
AYear returns the year that AValue represents.
AMonth returns the month that AValue represents, where 1 is January and 12 is December.
AWeekOfMonth returns the week within AMonth that AValue represents, where 1 is the first week with four or more days.
ADayOfWeek returns the day within AWeekOfMonth that AValue represents, where 1 is Monday and 7 is Sunday.
Note: The definitions for AWeekOfMonth and ADayOfWeek reflect the ISO 8601 standard.
Tip: To make the ADayOfWeek value more readable, use the day of week constants.