hodatime-0.2.2.1: A fully featured date/time library based on Nodatime
Copyright(C) 2016 Jason Johnson
LicenseBSD-style (see the file LICENSE)
MaintainerJason Johnson <jason.johnson.081@gmail.com>
Stabilityexperimental
PortabilityTBD
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.HodaTime.Duration

Description

A Duration is fixed period of time between global times.

Synopsis

Types

data Duration Source #

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.

Instances

Instances details
Show Duration Source # 
Instance details

Defined in Data.HodaTime.Instant.Internal

Eq Duration Source # 
Instance details

Defined in Data.HodaTime.Instant.Internal

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)

fromHours :: Int -> Duration Source #

Duration of 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

Math

add :: Duration -> Duration -> Duration Source #

Add two durations together

minus :: Duration -> Duration -> Duration Source #

Subtract one duration from the other