System.DateUtils.WithinPastWeeks

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function WithinPastWeeks(const ANow, AThen: TDateTime; const AWeeks: Integer): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall WithinPastWeeks(const System::TDateTime ANow, const System::TDateTime AThen, const int AWeeks);

Properties

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

Description

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

Call WithinPastWeeks to determine whether the date specified by ANow is within AWeeks weeks of the date specified by AThen.

Note: WithinPastWeeks uses the WeeksBetween function, which means that fractional weeks do not count. If ANow and AThen are two and a half weeks apart, calling WithinPastWeeks with AWeeks set to 2 returns True.

See Also


Code Examples