Toml.Codec.Combinator.Time

tomland-1.3.3.3: Bidirectional TOML serialization

Copyright | (c) 2018-2022 Kowainik
License | MPL-2.0
Maintainer | Kowainik <xrom.xkov@gmail.com>
Stability | Stable
Portability | Portable
Safe Haskell | None
Language | Haskell2010

Toml.Codec.Combinator.Time

Description

TOML-specific combinators for converting between TOML and Haskell date and time data types. TOML specification describes date and time primitives you can use in your configuration. `tomland` provides mapping of those primitives to types from the `time` library.

Haskell Type | `TOML` | `TomlCodec`
--- | --- | ---
`ZonedTime` | `a = 2020-05-16T04:32:00Z` | ``zonedTime` "a"`
`LocalTime` | `a = 2020-05-16T04:32:00` | ``localTime` "a"`
`Day` | `a = 2020-05-16` | ``day` "a"`
`TimeOfDay` | `a = 04:32:00` | ``timeOfDay` "a"`

Since: 1.3.0.0

Synopsis

- zonedTime :: Key -> TomlCodec ZonedTime
- localTime :: Key -> TomlCodec LocalTime
- day :: Key -> TomlCodec Day
- timeOfDay :: Key -> TomlCodec TimeOfDay

# Documentation

zonedTime :: Key -> TomlCodec ZonedTime #

Codec for zoned time values.

Since: 0.5.0

localTime :: Key -> TomlCodec LocalTime #

Codec for local time values.

Since: 0.5.0

day :: Key -> TomlCodec Day #

Codec for day values.

Since: 0.5.0

timeOfDay :: Key -> TomlCodec TimeOfDay #

Codec for time of day values.

Since: 0.5.0