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



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

StartOfTheYear

Return the first day of the year, given a date in this year.

Declaration

Source position: dateutil.inc line 132

function StartOfTheYear(

  const AValue: TDateTime

):TDateTime;

Arguments

AValue

  

Date in year of which to return the start

Function result

First day of the year as a TDateTime value.

Description

StartOfTheYear extracts the year part of AValue and returns a TDateTime value with the date of the first day of that year (January 1), as the StartOfAYear function.

See also

StartOfAYear

  

Return the first day of a given year.

EndOfTheYear

  

Calculate a DateTime value representing the last day of a year, given a date in that year.

EndOfAYear

  

Calculate a DateTime value representing the last day of a year

Example

Program Example24;

{ This program demonstrates the StartOfTheYear function }

Uses SysUtils,DateUtils;

Const
  Fmt = '"First day of this year : "dd mmmm yyyy';

Begin
  Writeln(FormatDateTime(Fmt,StartOfTheYear(Today)));
End.

Notes

 No notes exist for this page yet. 





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