RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.WithinPastSeconds Function

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

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

DateUtils

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 2 and a half seconds apart, calling WithinPastSeconds with ASeconds set to 2 returns true.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!