Weekly class

Represents a schedule that occurs every n weeks on the given weekdays.

Throws an ArgumentError if:

Inheritance

Constructors

Weekly({required DateTime startDate, required int frequency, required List<int> weekdays, DateTime? endDate})
Creates a weekly schedule that occurs every frequency weeks on the given weekdays.
factory
Weekly.timed({required DateTime startDate, required int frequency, required List<int> weekdays, required Iterable<TimeOfDay> timesOfDay, DateTime? endDate})
Creates a weekly schedule that occurs every frequency weeks on the given weekdays at the given timesOfDay.
factory

Properties

endDate DateTime?
The date that this schedule ends on.
finalinherited
frequency int
The frequency at which this schedule occurs.
final
hashCode int
The hash code for this object.
no setterinherited
isTimed bool
Whether this schedule is timed.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startDate DateTime
The date that this schedule begins on.
finalinherited
timingMode ScheduleTimingMode
The timing mode of this schedule.
finalinherited
weekdays List<int>
The weekdays that this schedule occurs on.
final

Methods

findNextNOccurrences(int n, {DateTime? fromDate, List<DateTime> excludeDates = const []}) List<DateTime>
Returns a list of the next n dates for this schedule.
inherited
findNextTillDateOccurrences(DateTime tillDate, {DateTime? fromDate, List<DateTime> excludeDates = const []}) List<DateTime>
Returns a list of dates active on the current schedule through tillDate.
inherited
getNextNOccurrences(int n, {DateTime? from, Iterable<DateTime>? exclude}) Iterable<DateTime>
Returns an iterable of the next n occurrences for this schedule.
override
getOccurrencesUntil(DateTime end, {DateTime? from, Iterable<DateTime>? exclude}) Iterable<DateTime>
Returns an iterable of the occurrences for this schedule until the given end date.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
occursAt(TimeOfDay timeOfDay) bool
Determine if this schedule occurs at the given timeOfDay.
inherited
occursOn(DateTime date) bool
Determine if this schedule includes the given date.
override
toString() String
A string representation of this object.
inherited

Operators

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