| DOWsInMonth Function | 
Unit
QESBPCSDateTime
Declaration
Function DOWsInMonth(const DOW: Byte; const Month, Year: Word): Integer;
Description
Exception results for invalid DOW or invalid Month.
| Parameters | 
| DOW | Day of the Week, Sunday = 1 through Saturday = 7 | 
| Month | Desired Month in the range 1 through 12 | 
| Year | Desired Year | 
Category
Date/Time Arithmetic RoutinesImplementation
 
| function DOWsInMonth (const DOW: Byte; const Month, Year: Word): Integer;
begin
     if (DOW < 1) or (DOW > 7) then
          raise EConvertError.Create (rsInvalidDOW);
     if (Month < 1) or (Month > 12) then
          raise EConvertError.Create (rsInvalidMonth);
     Result := DOWsInRange (DOW, GetFirstDayOfMonth (Month, Year), GetLastDayOfMonth (Month, Year));
End; | 
|  |