DateTimeRangeExtensions extension

Extension on DateTimeRange to provide additional functionality

on

Methods

inRange(DateTime date, {bool isInclusive = true}) bool

Available on DateTimeRange<DateTime>, provided by the DateTimeRangeExtensions extension

Returns true if the given date is within this range.
isNowInRange({DateTime? now, bool isInclusive = true}) bool

Available on DateTimeRange<DateTime>, provided by the DateTimeRangeExtensions extension

Returns true if now is within this range.
isNthDayOfMonthInRange({required int n, required int dayOfWeek, required int month, bool isInclusive = true}) bool

Available on DateTimeRange<DateTime>, provided by the DateTimeRangeExtensions extension

Returns true if the nth occurrence of dayOfWeek in the given month falls within this date range.