System.DateUtils.EndOfADay

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function EndOfADay(const AYear, ADayOfYear: Word): TDateTime;
function EndOfADay(const AYear, AMonth, ADay: Word): TDateTime;

C++

extern DELPHI_PACKAGE System::TDateTime __fastcall EndOfADay(const System::Word AYear, const System::Word ADayOfYear)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.DateUtils.pas
System.DateUtils.hpp
System.DateUtils System.DateUtils

Description

Returns a TDateTime that represents the last millisecond of a specified day.

EndOfADay returns the last expressible moment (11:59:59.999 P.M.) of a specified day.

The AYear parameter specifies the year of the desired day.

The ADayOfYear parameter specifies the desired day as a day of the year, where 1 is January 1, 2 is January 2, 32 is February 1, and so on.

The AMonth and ADay parameters specify the desired day as a month of the year and day of the month. AMonth can range from 1 through 12. ADay can range from 1 through 28, 29, 30, or 31, depending on the values of AYear and AMonth.

If the parameters do not specify a valid date, EndOfADay raises an EConvertError exception.

See Also


Code Examples