RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.WeeksInYear Function

Returns the number of weeks in the year of a specified TDateTime value.

Pascal
function WeeksInYear(const AValue: TDateTime): Word;
C++
Word WeeksInYear(const TDateTime AValue);

DateUtils

Call WeeksInYear to obtain the number of weeks in the year of the TDateTime value specified by AValue.

Note: WeeksInYear 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 WeeksInYear always returns either 52 or 53.
 

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