Skip to content

DaysInAYear

Number of days in a particular year.

Declaration

Source position: dateutil.inc line 122

function DaysInAYear(const AYear: Word) : Word;

Arguments

Name Description
AYear Year for the number of days in the return value.

Function result

Number of days in year AYear.

Description

DaysInAYear returns the number of weeks in the year AYear. The return value is either 365 or 366.

See also

Name Description
WeeksInAYear Returns the number of weeks in a given year.
WeeksInYear Returns the number of weeks in the year, given a date.
DaysInYear Return the number of days in the year in which a date occurs.
DaysInMonth Return the number of days in the month in which a date occurs.
DaysInAMonth Number of days in a month of a certain year.

Example

Program Example15;

{ This program demonstrates the DaysInAYear function }

Uses SysUtils,DateUtils;

Var
  Y : Word;

Begin
  For Y:=1992 to 2010 do
    Writeln(Y,' has ',DaysInAYear(Y),' days.');
End.