RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.WeeksInAYear Function

Returns the number of weeks in a specified year.

Pascal
function WeeksInAYear(const AYear: Word): Word;
C++
Word WeeksInAYear(const Word AYear);

DateUtils

Call WeeksInAYear to obtain the number of weeks in the year specified by AYear. AYear is a year between 1 and 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 4 or more days in the year). This means that WeeksInAYear always returns either 52 or 53.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!