equals method
Compares the given period for equality with this one.
Periods are equal if they contain the same values for the same properties. However, no normalization takes place, so 'one hour' is not equal to "sixty minutes".
other
: The period to compare this one with.
Returns: True if this period has the same values for the same properties as the one specified.
Implementation
bool equals(Period other) =>
years == other.years &&
months == other.months &&
weeks == other.weeks &&
days == other.days &&
hours == other.hours &&
minutes == other.minutes &&
seconds == other.seconds &&
milliseconds == other.milliseconds &&
microseconds == other.microseconds &&
nanoseconds == other.nanoseconds;