Show: Delphi C++
Display Preferences

System.DateUtils.WithinPastDays

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function WithinPastDays(const ANow, AThen: TDateTime; const ADays: Integer): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall WithinPastDays(const System::TDateTime ANow, const System::TDateTime AThen, const int ADays);

Properties

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

Description

Indicates whether two dates are within a specified number of days of each other.

Call WithinPastDays to determine whether the date specified by ANow is within ADays days of the date specified by AThen.

Note: WithinPastDays uses the DaysBetween function, which means that fractional days do not count. If ANow and AThen are two and a half days apart, calling WithinPastDays with ADays set to 2 returns True.

See Also


Code Examples

Personal tools
In Other Languages
Previous Versions
Assistance