Data.Time.Format.Internal

time-1.9.2: A time library

Safe Haskell | Safe
Language | Haskell2010

Data.Time.Format.Internal

Description

The contents of this module is liable to change, or disappear entirely. Please let me know if you depend on anything here.

Synopsis

- class FormatTime t where
  - formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> t -> String)
- class ParseTime t where
  - substituteTimeSpecifier :: proxy t -> TimeLocale -> Char -> Maybe String
  - parseTimeSpecifier :: proxy t -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String
  - buildTime :: TimeLocale -> [(Char, String)] -> Maybe t

# Documentation

class FormatTime t where Source #

Methods

formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> t -> String) Source #

Since: time-1.9.1

#### Instances

Instances details

FormatTime CalendarDiffDays # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> CalendarDiffDays -> String) Source #
FormatTime Day # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> Day -> String) Source #
FormatTime DayOfWeek # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> DayOfWeek -> String) Source #
FormatTime DiffTime # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> DiffTime -> String) Source #
FormatTime NominalDiffTime # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> NominalDiffTime -> String) Source #
FormatTime UTCTime # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> UTCTime -> String) Source #
FormatTime UniversalTime # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> UniversalTime -> String) Source #
FormatTime CalendarDiffTime # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> CalendarDiffTime -> String) Source #
FormatTime TimeZone # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> TimeZone -> String) Source #
FormatTime TimeOfDay # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> TimeOfDay -> String) Source #
FormatTime LocalTime # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> LocalTime -> String) Source #
FormatTime ZonedTime # |
Instance details Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> ZonedTime -> String) Source #

class ParseTime t where Source #

The class of types which can be parsed given a UNIX-style time format string.

Minimal complete definition

parseTimeSpecifier, buildTime

Methods

substituteTimeSpecifier :: proxy t -> TimeLocale -> Char -> Maybe String Source #

Since: time-1.9.1

parseTimeSpecifier :: proxy t -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source #

Get the string corresponding to the given format specifier.

Since: time-1.9.1

buildTime Source #

Arguments

:: TimeLocale | The time locale.
-> [(Char, String)] | Pairs of format characters and the corresponding part of the input.
-> Maybe t |

Builds a time value from a parsed input string. If the input does not include all the information needed to construct a complete value, any missing parts should be taken from 1970-01-01 00:00:00 +0000 (which was a Thursday). In the absence of `%C` or `%Y`, century is 1969 - 2068.

Since: time-1.9.1

#### Instances

Instances details

ParseTime CalendarDiffDays # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy CalendarDiffDays -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy CalendarDiffDays -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe CalendarDiffDays Source #
ParseTime Day # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy Day -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy Day -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe Day Source #
ParseTime DiffTime # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy DiffTime -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy DiffTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe DiffTime Source #
ParseTime NominalDiffTime # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy NominalDiffTime -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy NominalDiffTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe NominalDiffTime Source #
ParseTime UTCTime # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy UTCTime -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy UTCTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe UTCTime Source #
ParseTime UniversalTime # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy UniversalTime -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy UniversalTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe UniversalTime Source #
ParseTime CalendarDiffTime # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy CalendarDiffTime -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy CalendarDiffTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe CalendarDiffTime Source #
ParseTime TimeZone # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy TimeZone -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy TimeZone -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe TimeZone Source #
ParseTime TimeOfDay # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy TimeOfDay -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy TimeOfDay -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe TimeOfDay Source #
ParseTime LocalTime # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy LocalTime -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy LocalTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe LocalTime Source #
ParseTime ZonedTime # |
Instance details Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: proxy ZonedTime -> TimeLocale -> Char -> Maybe String Source # parseTimeSpecifier :: proxy ZonedTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String Source # buildTime :: TimeLocale -> [(Char, String)] -> Maybe ZonedTime Source #