System.DateUtils.WeeksInYear

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function WeeksInYear(const AValue: TDateTime): Word;

C++

extern DELPHI_PACKAGE System::Word __fastcall WeeksInYear(const System::TDateTime AValue);

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 the year of a specified TDateTime value.

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 four or more days in the year). This means that WeeksInYear always returns either 52 or 53.

See Also


Code Examples