System.DateUtils.TimeInRange
Delphi
function TimeInRange(ATime: TTime; AStartTime, AEndTime: TTime; AInclusive: Boolean = True): Boolean;
C++
extern DELPHI_PACKAGE bool __fastcall TimeInRange(System::TTime ATime, System::TTime AStartTime, System::TTime AEndTime, bool AInclusive = true);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.DateUtils.pas System.DateUtils.hpp |
System.DateUtils | System.DateUtils |
Description
Checks whether a TDateTime value is in range.
The TimeInRange routine checks whether the TTime value ATime
is between AStartTime
and AEndTime
.
If the AInclusive
Boolean parameter is true, then the limits are included; if it is false, the limits are excluded. By default, AInclusive
is true.
Note: The
AStartTime
value should be before theAEndTime
value.