Unit 'DateUtils' Package
[Overview][Constants][Classes][Procedures and functions][Index] [#rtl]

TimeInRange

Checks whether a time value is in a given range.

Declaration

Source position: dateutil.inc line 390

function TimeInRange(

  ATime: TTime;

  AStartTime: TTime;

  AEndTime: TTime;

  AInclusive: Boolean = True

):Boolean;

Description

TimeInRange checks whether the value ATime lies between AStartTime and AEndTime, and returns True if it is. When AInclusive is True (the default), then the limits are included. When AInclusive is False, the limits are excluded. Only the time part of the 3 parameters is considered.

Errors

The AStartTime value must be before AEndTime, but no check is performed.

See also

DateInRange

  

Checks whether a date value is in a given rang.

DateTimeInRange

  

Checks whether a date/time value is in a given range.


Documentation generated on: Dec 26 2024