Skip to content

IsToday

Check whether a given date is today.

Declaration

Source position: dateutil.inc line 135

function IsToday(const AValue: TDateTime) : Boolean;

Arguments

Name Description
AValue Date to check, may contain a time part.

Function result

True if AValue is today, False otherwise.

Description

IsToday returns True if AValue is today's date, and False otherwise.

See also

Name Description
Today Return the current date.
Yesterday Return the previous day.
Tomorrow Return the next day after today.
IsSameDay Check if two date/time indications are the same day.

Example

Program Example20;

{ This program demonstrates the IsToday function }

Uses SysUtils,DateUtils;

Begin
  Writeln('Today     : ',IsToday(Today));
  Writeln('Tomorrow  : ',IsToday(Tomorrow));
  Writeln('Yesterday : ',IsToday(Yesterday));
End.