elm-community/elm-time/1.0.9

NOTE: this package is not compatible with Elm 0.19.1

Time.TimeZone

This module defines a representations for Timezone information.

TimeZone values

TimeZone represents the opaque type of timezone values. These are generally loaded from an external source via unpack.

See also http://momentjs.com/timezone/docs/#/data-formats/packed-format/.

name : TimeZone -> String

name returns a TimeZone's name.

abbreviation : Time -> TimeZone -> String

Given an arbitrary Time and a TimeZone, abbreviation returns the TimeZone's abbreviation at that Time.

offset : Time -> TimeZone -> Int

Given an arbitrary Time and a TimeZone, offset returns the TimeZone's UTC offset in milliseconds at that Time.

offsetString : Time -> TimeZone -> String

Given an arbitrary Time and TimeZone, offsetString returns an ISO8601-formatted UTC offset for at that Time.

Manipulating TimeZones

setName : String -> TimeZone -> TimeZone

setName updates a TimeZone's name.

Constructing TimeZones

unpack : String -> Result (List String) TimeZone

unpack decodes a packed zone data object into a TimeZone value.

See also http://momentjs.com/timezone/docs/#/data-formats/packed-format/