| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Text.Format.Time
Contents
Description
This module extend vformat to FormatTime datatypes
The specs of FormatTime is same as the second argument of
"Data.Time.Format.formatTime".
Examples
>>>utc <- getCurrentTime>>>zoned <- getZonedTime>>>let locale = utcToLocalTime (zonedTimeZone zoned) utc>>>format "{} / {} / {}" utc zoned locale"2020-01-21 05:54:41.137832 / 2020-01-21 13:54:45.310354 CST / 2020-01-21 13:54:41.137832">>>format "{:%Y-%m-%dT%H:%M:%S}" utc"2020-01-21T05:54:41"
Synopsis
- formatTimeLocale :: FormatTime t => TimeLocale -> t -> Formatter
- formatTime :: FormatTime t => t -> Formatter
Documentation
formatTimeLocale :: FormatTime t => TimeLocale -> t -> Formatter Source #
Formatter for FormatTime values using a specific TimeLocale.
formatTime :: FormatTime t => t -> Formatter Source #
Formatter for FormatTime values using the defaultTimeLocale.
Orphan instances
| FormatArg ZonedTime Source # | Default specs is |
| FormatArg LocalTime Source # | Default specs is |
| FormatArg TimeOfDay Source # | Default specs is |
| FormatArg TimeZone Source # | Default specs is |
| FormatArg UniversalTime Source # | Default specs is |
Methods formatArg :: UniversalTime -> Formatter # formatArgList :: [UniversalTime] -> Formatter keyOf :: UniversalTime -> ArgKey | |
| FormatArg UTCTime Source # | Default specs is |
| FormatArg Day Source # | Default specs is |