Skip to content

DateInRange

Checks whether a date value is in a given rang

Declaration

Source position: dateutil.inc line 369

  function DateInRange(ADate: TDate; AStartDate: TDate; AEndDate: TDate; 
                      AInclusive: Boolean) : 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

Name Description
DateTimeInRange Checks whether a date/time value is in a given range
TimeInRange Checks whether a time value is in a given range