AnnualDate class
Represents an annual date (month and day) in the ISO calendar but without a specific year, typically for recurrent events such as birthdays, anniversaries, and deadlines.
In the future, this class may be expanded to support other calendar systems, but this does not generalize terribly cleanly, particularly to the Hebrew calendar system with its leap month.
- Implemented types
- Annotations
-
- @immutable
Constructors
- AnnualDate([int month = 1, int day = 1])
- Constructs an instance for the given month and day in the ISO calendar.
Properties
Methods
-
compareTo(
AnnualDate? other) → int -
Indicates whether this annual date is earlier, later or the same as another one.
override
-
inYear(
int year) → LocalDate - Returns this annual date in a particular year, as a LocalDate.
-
isValidYear(
int year) → bool -
Checks whether the specified year forms a valid date with the month/day in this
value, without any truncation. This will always return
true
except for values representing February 29th, where the specified year is a non leap year. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a String that represents this instance.
override
Operators
-
operator <(
AnnualDate rhs) → bool - Compares two annual dates to see if the left one is strictly earlier than the right one.
-
operator <=(
AnnualDate rhs) → bool - Compares two annual dates to see if the left one is earlier than or equal to the right one.
-
operator ==(
Object rhs) → bool -
Compares two AnnualDate values for equality.
override
-
operator >(
AnnualDate rhs) → bool - Compares two annual dates to see if the left one is strictly later than the right one.
-
operator >=(
AnnualDate rhs) → bool - Compares two annual dates to see if the left one is later than or equal to the right one.