cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Copyright © 2018-2020 IOHK
License Apache-2.0
Safe Haskell Safe-Inferred
Language Haskell2010

Data.Time.Text

Description

Utility functions for converting time values to and from text.

Synopsis

Conversion to and from text

utcTimeToText :: TimeFormat -> UTCTime -> Text Source #

Convert the specified time value to text, using the specified time format.

utcTimeFromText :: [ TimeFormat ] -> Text -> Maybe UTCTime Source #

Attempt to use each of the specified time formats to parse the given text. Returns a time value that corresponds to the first matching format, or Nothing if none of the formats matched.

Time format specification

data TimeFormat Source #

Represents a particular way of representing a moment in time in text.

Time formats

iso8601BasicUtc :: TimeFormat Source #

Represents the ISO 8601 basic format (UTC).

iso8601BasicLocal :: TimeFormat Source #

Represents the ISO 8601 basic format (with local timezone).

iso8601ExtendedUtc :: TimeFormat Source #

Represents the ISO 8601 extended format (UTC).

iso8601ExtendedLocal :: TimeFormat Source #

Represents the ISO 8601 extended format (with local timezone).

Time format families

iso8601 :: [ TimeFormat ] Source #

Represents the ISO 8601 family of formats.

iso8601Basic :: [ TimeFormat ] Source #

Represents the ISO 8601 basic family of formats.

iso8601Extended :: [ TimeFormat ] Source #

Represents the ISO 8601 extended family of formats.