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

Yesterday

Return the previous day.

Declaration

Source position: dateutil.inc line 110

function Yesterday: TDateTime;

Function result

Previous day as TDateTime.

Description

Yesterday returns yesterday's date. Yesterday is determined from the system clock, i.e. it is Today -1.

See also

Today

  

Return the current date

Tomorrow

  

Return the next day

Example

Program Example18;

{ This program demonstrates the Yesterday function }

Uses SysUtils,DateUtils;

Begin
  Writeln(FormatDateTime('"Today is " dd mmmm yyyy',Today));
  Writeln(FormatDateTime('"Yesterday was " dd mmmm yyyy',Yesterday));
End.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.