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

IsToday

Check whether a given date is today.

Declaration

Source position: dateutil.inc line 111

function IsToday(

  const AValue: TDateTime

):Boolean;

Arguments

AValue

  

Date to check, may contain a time part.

Function result

Trueif AValueis today, Falseotherwise.

Description

IsTodayreturns Trueif AValueis today's date, and Falseotherwise.

See also

Today

  

Return the current date

Yesterday

  

Return the previous day.

Tomorrow

  

Return the next day

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.