help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Procedures and functions] Reference for unit 'dateutils' (#rtl)

DaysInYear

Return the number of days in the year in which a date occurs.

Declaration

Source position: dateutil.inc line 97

function DaysInYear(

  const AValue: TDateTime

):Word;

Arguments

AValue

  

Date in year of which to calculate the number of days.

Function result

Number of days in the year in which AValue occurs.

Description

daysInYear returns the number of days in the year part of AValue. The return value is either 365 or 366.

See also

WeeksInAYear

  

Return the number of weeks in a given year

WeeksInYear

  

return the number of weeks in the year, given a date

DaysInAYear

  

Number of days in a particular year.

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 Example14;

{ This program demonstrates the DaysInYear function }

Uses SysUtils,DateUtils;

Var
  Y : Word;

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

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505