From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function WeeksInAYear(const AYear: Word): Word;


extern DELPHI_PACKAGE System::Word __fastcall WeeksInAYear(const System::Word AYear);


Type Visibility Source Unit Parent
function public
System.DateUtils System.DateUtils


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

Code Examples