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
-
- Object
- DateValidator
- ExactDateValidator
- DateValidatorDayInYear
- EveryDayInYear
- 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
-
Returns whether the DateTime passed to valid or invalid needs to fit
exactly a specific date.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- inexact → bool
-
Returns whether the DateTime passed to valid or invalid can be
inexact.
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
yearsfrom 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
dateis 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
dateis 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