hodatime-0.2.1.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
LanguageHaskell2010

Data.HodaTime.Instant

Contents

Description

An Instant is universal fixed moment in time.

Synopsis

Types

data Instant Source #

Represents a point on a global time line. An Instant has no concept of time zone or calendar. It is nothing more than the number of nanoseconds since epoch (1.March.2000)

Constructors

fromSecondsSinceUnixEpoch :: Int -> Instant Source #

Create an Instant from an Int that represents a Unix Epoch

Math

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

Add a Duration to an Instant to get a future Instant. NOTE: does not handle all negative durations, use minus

difference :: Instant -> Instant -> Duration Source #

Get the difference between two instances

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

Subtract a Duration from an Instant to get an Instant in the past. NOTE: does not handle negative durations, use add

Conversion

inTimeZone :: Instant -> TimeZone -> ZonedDateTime cal Source #

Convert Instant to a ZonedDateTime in the specified time zone. The calendar must be derivable or specified in the type explicitly

Debug - to be removed