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

DateInRange

Checks whether a date value is in a given rang.

Declaration

Source position: dateutil.inc line 391

function DateInRange(

  ADate: TDate;

  AStartDate: TDate;

  AEndDate: TDate;

  AInclusive: Boolean = True

):Boolean;

Description

DateInRange checks whether the value ADate lies between AStartDate and AEndDate, 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 date part of the 3 parameters is considered.

Errors

The AStartDate value must be before AEndDate, but no check is performed.

See also

TimeInRange

  

Checks whether a time value is in a given range.

DateTimeInRange

  

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


Documentation generated on: Nov 23 2024