DateInterval class

Defines a repetition interval.

Constructors

DateInterval({DateTime? startDate, DateTime? endDate, int period = 1, Intervals interval = Intervals.once, Iterable<DateTime>? skipDates, Iterable<int>? additionalDaysOfTheMonth})
Creates an instance of the DateInterval class. period must be greater than 0 or it will throw an ArgumentError.

Properties

additionalDates List<int>
Any additional "days of the month" that work alongside the start date.
final
endDate DateTime?
The last possible day for this interval. Any dates beyond this date will not be counted.
latefinal
hashCode int
The hash code for this object.
no setterinherited
interval Intervals
The interval at which this pattern occurs.
final
period int
The frequency at which the interval occurs, i.e. how many intervals between each date.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipDates List<DateTime>
Any specific dates within the interval to skip that might otherwise be counted.
final
startDate DateTime
The beginning of the interval. Determines the day-of-month (for monthly interval), day-of-week (for weekly interval).
latefinal

Methods

getDatesThrough(DateTime targetEndDate) Iterable<DateTime>
Returns an Iterable<DateTime> of all valid dates between the configured startDate and the earliest of the configured endDate (if present) or the supplied targetEndDate.
includes(DateTime targetDate) bool
Determines if the targetDate falls along the configured interval.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited