compareTo method
Indicates whether this annual date is earlier, later or the same as another one.
other: The other annual date to compare this one with
A value less than zero if this annual date is earlier than other;
zero if this time is the same as other; a value greater than zero if this annual date is
later than other.
Implementation
@override
int compareTo(AnnualDate? other) {
if (other == null) return 1;
return _value.compareTo(other._value);
}