Period differentiates between "10 years" and "10 years, zero months"; the
latter contains the Months PeriodUnit; the former does not.
However, both instances will compare as equal, and in both cases Months will
return zero; the only differentiation is via the Units property.
Do we actually have a sensible reason to support differentiation between
zero-valued and absent-valued properties? If not, we could consider simplify
Period somewhat by removing the Units property entirely, making PeriodUnits
simply an input parameter to Between methods (and internally, as an
implementation detail in Period).
[In particular, the fact that equal Periods can have different Units property
values is troubling me; if they're not intended to be interchangable, why are
they equal?]
Original issue reported on code.google.com by
malcolm.roweon 26 Jul 2012 at 1:40