StartOfAWeek returns a TDateTime value that represents 12:00:00:00 A.M. on a specified day of a specified week.
The AYear parameter specifies the year of the desired day.
The AWeekOfYear parameter specifies the week of the year, where 1 is the first week in AYear that includes four or more days.
The ADayOfWeek parameter indicates the desired day in the specified week, where 1 is Monday, 2 is Tuesday, and so on.
The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.
If a valid date is not specified, StartOfAWeek raises an exception error EConvertError.
Declaration: Function StartOfAWeek(const AYear, AWeekOfYear, ADayOfWeek: Word) TDateTime;
An example follows.