Returns the Date for a given Day of Week, a given WeekNo, and the given Year, as defined in ISO-8601.Unit
QESBPCSDateTime
Declaration
Function ISOYWD2Date(const Year: Word; const WeekNo, DOW: Integer): TDateTime;
Description
Note that the Start of the Week is Monday, and that DOW uses 1 for Monday.
| Year | 4 digit year to which the Week Number applies. | 
| WeekNo | the ISO-8601 Week Number in specified Year. | 
| DOW | Day of Week, 1 for Monday through 7 for Sunday. | 
Category
Date/Time Arithmetic Routines
Week Based Arithmetic Routines
Implementation
 
  | function ISOYWD2Date (const Year: Word; const WeekNo, DOW: Integer): TDateTime;
begin
     if (DOW < 1) or (DOW > 7) then
          raise EConvertError.Create (rsInvalidDOW);
     Result := StartOfISOWeekNo (WeekNo, Year) + DOW - 1;
End; | 
Declaration
Function ISOYWD2Date(const Year, WeekNo, DOW: Integer): TDateTime;Implementation
 
  | function ISOYWD2Date (const Year, WeekNo, DOW: Integer): TDateTime;
begin
     if (DOW < 1) or (DOW > 7) then
          raise EConvertError.Create (rsInvalidDOW);
     Result := StartOfISOWeekNo (WeekNo, Year) + DOW - 1;
End; | 
| HTML generated by Time2HELP | 
http://www.time2help.com