Skip to content

Remove the concept of missing vs zero values from Period. #90

Description

@GoogleCodeExporter
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.rowe on 26 Jul 2012 at 1:40

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions