RAD Studio VCL Reference
|
Returns a TDateTime that represents a specified occurrence of a day of the week within a specified month and year.
function EncodeDayOfWeekInMonth(const AYear: Word; const AMonth: Word; const ANthDayOfWeek: Word; const ADayOfWeek: Word): TDateTime;
TDateTime EncodeDayOfWeekInMonth(const Word AYear, const Word AMonth, const Word ANthDayOfWeek, const Word ADayOfWeek);
EncodeDayOfWeekInMonth returns a TDateTime for the date specified by the AYear, AMonth, ANthDayOfWeek, and ADayOfWeek parameters. The time portion of the return value is 0 (Midnight at the start of the specified day).
AYear is the year. It can be any value between 1 and 9999 (inclusive).
AMonth is the month. It can be any value between 1 and 12 (inclusive).
ANthDayOfWeek indicates the occurrence for the day of the week represented by ADayOfWeek. It can be any value between 1 and 5 (inclusive), as long as this value specifies a valid date. For example, if a month does not include 5 Mondays, setting ANthDayOfWeek to 5 and ADayOfWeek to 1 causes EncodeDayOfWeekInMonth to raise an exception.
ADayOfWeek is the day of the week, where 1 Monday and 7 is Sunday.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|