Sign in Join
FPDoc Onlineexperiment

HourOfTheYear function

In unit DateUtils

Calculate the number of hours passed since the start of the year.

Declaration

pascal
function HourOfTheYear(const AValue: TDateTime): Word

Arguments

AValue

TDateTime value for which to calculate the hour of the year.

Function result

Number of hours passed since the start of the year till AValue .

Description

HourOfTheYear returns the number of hours that have passed since the start of the year (January 1, 00:00:00) till the moment indicated by AValue. This is a zero-based number, i.e. January 1 00:59:59 will return 0.

For an example, see the WeekOfTheYear function.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.