System.DateUtils.WeeksInAYear
Delphi
function WeeksInAYear(const AYear: Word): Word;
C++
extern DELPHI_PACKAGE System::Word __fastcall WeeksInAYear(const System::Word AYear);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.DateUtils.pas System.DateUtils.hpp |
System.DateUtils | System.DateUtils |
Description
Returns the number of weeks in a specified year.
Call WeeksInAYear to obtain the number of weeks in the year specified by AYear. AYear is a year from 1 through 9999 (inclusive).
Note: WeeksInAYear defines the first week of the year according to the ISO 8601 standard. That is, the first week of the year is the one that includes the first Thursday of the year (the first week that has four or more days in the year). This means that WeeksInAYear always returns either 52 or 53.
See Also