Copyright | (C) 2016 Jason Johnson |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Jason Johnson <jason.johnson.081@gmail.com> |
Stability | experimental |
Portability | TBD |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A Duration
is fixed period of time between global times.
Synopsis
- data Duration
- fromStandardWeeks :: Int -> Duration
- fromStandardDays :: Int -> Duration
- fromHours :: Int -> Duration
- fromMinutes :: Int -> Duration
- fromSeconds :: Int -> Duration
- fromMilliseconds :: Int -> Duration
- fromMicroseconds :: Int -> Duration
- fromNanoseconds :: Int -> Duration
- add :: Duration -> Duration -> Duration
- minus :: Duration -> Duration -> Duration
Types
Represents a duration of time between instants. It can be from days to nanoseconds, but anything longer is not representable by a duration because e.g. Months are calendar specific concepts.
Constructors
fromStandardWeeks :: Int -> Duration Source #
Duration of standard weeks (a standard week is assumed to be exactly 7 24 hour days)
fromStandardDays :: Int -> Duration Source #
Duration of standard days (a standard day is assumed to be exactly 24 hours)
fromMinutes :: Int -> Duration Source #
Duration of minutes
fromSeconds :: Int -> Duration Source #
Duration of seconds
fromMilliseconds :: Int -> Duration Source #
Duration of milliseconds
fromMicroseconds :: Int -> Duration Source #
Duration of microseconds
fromNanoseconds :: Int -> Duration Source #
Duration of nanoseconds