Unit 'DateUtils' Package
[Overview][Constants][Classes][Procedures and functions][Index] [#rtl]

Yesterday

Return the previous day.

Declaration

Source position: dateutil.inc line 132

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.

Documentation generated on: Dec 26 2024