YearRange class
Lightweight class representing one or more consecutive years.
Constructors
- YearRange(Date start, int length)
-
Create a YearRange with the given
start
andlength
. - YearRange.within(CalendarYear? min, CalendarYear? max, int length, {CalendarYear? tryToStartAt})
-
Create a YearRange with desired
length
and (ideally) start, constrained bymin
andmax
.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
The number of years in the range. Should be at least 1.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → Date
-
The year at the beginning of the range. The 'month' and 'day' fields are
generally ignored, but should be 1, by convention.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toList(
CalendarState state, int startingWeekday) → List< CalendarYear> - Eagerly construct a list of CalendarYear instances corresponding to this YearRange.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited