EveryDayInYear class

Class that processes DateTime so that the addYears always returns the next day where the difference in days between the date and the first day of the year is equal to the dayInYear.

Inheritance
Implemented types
Mixed-in types

Constructors

EveryDayInYear(int dayInYear)
Returns a EveryDayInYear with the given dayInYear.
const
EveryDayInYear.from(DateTime date)
Returns a EveryDayInYear with the dayInYear calculated by the given date.
factory

Properties

dayInYear int
The expected day in the year.
finalinherited
exact bool
If true, the day of the year must be exactly this dayInYear. If false, if the dayInYear is greater than the days in year, the DateTime will be valid if the DateTime.day is the last day of the year.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

addYears(DateTime date, int years) DateTime
Returns a new DateTime where the year is years from this year and the DateTime.day is equal to dayInYear-1 added to January 1st.
override
compareTo(DateValidatorDayInYear other) int
Compares this object to another object.
inherited
filterValidDates(Iterable<DateTime> dates) Iterable<DateTime>
Returns the valid dates for this DateValidator in dates.
inherited
invalid(DateTime date) bool
Returns true if the date is invalid for this DateValidator.
inherited
next(DateTime date) DateTime
Returns the next date that fits the dayInYear.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
previous(DateTime date) DateTime
Returns the previous date that fits the dayInYear.
override
startDate(DateTime date) DateTime
Returns the next date that fits the dayInYear.
override
toString() String
A string representation of this object.
override
valid(DateTime date) bool
Returns true if the date is valid for this DateValidator.
inherited
validsIn(Iterable<DateTime> dates) Iterable<DateTime>
Returns the valid dates for this DateValidator in dates.
inherited

Operators

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