Skip to content

Creating a LocalTime from a TimeSpan should be simpler than it is #148

Description

@GoogleCodeExporter
While a TimeSpan really *isn't* a time of day, bits of the BCL treat it that 
way. It would be appropriate to have LocalTime.FromTimeSpan with appropriate 
caveats, and also LocalTime.FromTicksSinceMidnight and 
LocalTime.FromSecondsSinceMidnight. The current workaround is:

    LocalTime.Midnight + Period.FromTicks(ticks)

which is pretty nasty.

Original issue reported on code.google.com by jonathan.skeet on 11 Nov 2012 at 9:18

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions