From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function WithinPastSeconds(const ANow, AThen: TDateTime; const ASeconds: Int64): Boolean;


extern DELPHI_PACKAGE bool __fastcall WithinPastSeconds(const System::TDateTime ANow, const System::TDateTime AThen, const __int64 ASeconds);


Type Visibility Source Unit Parent
function public
System.DateUtils System.DateUtils


Indicates whether two date/time values are within a specified number of seconds of each other.

Call WithinPastSeconds to determine whether the date and time specified by ANow is within ASeconds seconds of the date and time specified by AThen.

Note: WithinPastSeconds uses the SecondsBetween function, which means that fractional seconds do not count. If ANow and AThen are two and a half seconds apart, calling WithinPastSeconds with ASeconds set to 2 returns True.

See Also

Code Examples