[Overview][Constants][Procedures and functions] |
Check if two date/time indications are the same day.
Source position: dateutil.inc line 112
function IsSameDay( |
const AValue: TDateTime; |
const ABasis: TDateTime |
):Boolean; |
AValue |
|
First date/time |
ABasis |
|
Second date/time |
Trueif AValueand ABasisare on the same day, Falseotherwise..
IsSameDaychecks whether AValueand ABasishave the same date part, and returns Trueif they do, Falseif not.
|
Return the current date |
|
|
Return the previous day. |
|
|
Return the next day |
|
|
Check whether a given date is today. |
Program Example21; { This program demonstrates the IsSameDay function } Uses SysUtils,DateUtils; Var I : Integer; D : TDateTime; Begin For I:=1 to 3 do begin D:=Today+Random(3)-1; Write(FormatDateTime('dd mmmm yyyy "is today : "',D)); Writeln(IsSameDay(D,Today)); end; End.