EncodeDayOfWeekInMonth function
Encodes a year, month, week, day of week specification to a
TDateTime value.
Declaration
function EncodeDayOfWeekInMonth(const AYear: Word; const AMonth: Word;
const ANthDayOfWeek: Word;
const ADayOfWeek: Word): TDateTimeArguments
AYear | Year. |
AMonth | Month in the year. |
ANthDayOfWeek | Week in the month. |
ADayOfWeek | Day of the week. |
Function result
TDateTime value representing
AYear ,
AMonth
ANthDayOfWeek .and
ADayOfWeek.Description
EncodeDayOfWeekInMonth encodes
AYear,
AMonth,
ADayOfweek and
ANthDayOfweek to a valid date stamp and
returns the result.
ANthDayOfweekis the N-th time that this weekday occurs in the month, e.g. the
third Saturday of the month.
For an example, see DecodeDayOfWeekInMonth.
Errors
If any of the values is not in range, then an
EConvertError
exception will be raised.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
