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

IsToday

Check whether a given date is today.

Declaration

Source position: dateutil.inc line 134

function IsToday(

  const AValue: TDateTime

):Boolean;

Arguments

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

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.

Documentation generated on: Dec 24 2024