Skip to content

Decide whether Duration.OneMinute (etc) should exist #70

Description

@GoogleCodeExporter
Currently, Duration exposes a bunch of canned fields like Zero, OneMinute, 
NegativeOneTick, and so on.  It also exposes sensible operator overloads and 
factory methods, meaning that it's unclear as to whether 'a duration of three 
days' should be best constructed via:

Duration.FromStandardDays(3)
or
Duration.OneStandardDay * 3

I suggest that we pick one, and I'd tend toward the factory methods, rather 
than trying to provide a bunch of fields for 'common but not really' durations.

Alternatively, we should remove the factory methods (apart from FromTimeSpan()) 
and rationalise the common durations (removing NegativeOneTick in favour of 
-OneTick and adding OneStandardWeek).  But I'd prefer the former, I think.

Original issue reported on code.google.com by malcolm.rowe on 20 Apr 2012 at 1:47

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions