Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
Data.Time.Format.Compat
Synopsis
- class FormatTime t
- formatTime :: FormatTime t => TimeLocale -> String -> t -> String
- parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t
- parseTimeOrError :: ParseTime t => Bool -> TimeLocale -> String -> String -> t
- readSTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadS t
- readPTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadP t
- parseTime :: ParseTime t => TimeLocale -> String -> String -> Maybe t
- readTime :: ParseTime t => TimeLocale -> String -> String -> t
- readsTime :: ParseTime t => TimeLocale -> String -> ReadS t
- class ParseTime t
- data TimeLocale = TimeLocale {
- wDays :: [(String, String)]
- months :: [(String, String)]
- amPm :: (String, String)
- dateTimeFmt :: String
- dateFmt :: String
- timeFmt :: String
- time12Fmt :: String
- knownTimeZones :: [TimeZone]
- defaultTimeLocale :: TimeLocale
- iso8601DateFormat :: Maybe String -> String
- rfc822DateFormat :: String
UNIX-style formatting
class FormatTime t #
Minimal complete definition
formatCharacter
formatTime :: FormatTime t => TimeLocale -> String -> t -> String #
UNIX-style parsing
Note in compat mode acceptWS argument is ignored, it's always True
.
parseTimeM :: (MonadFail m, ParseTime t) => Bool -> TimeLocale -> String -> String -> m t #
parseTimeOrError :: ParseTime t => Bool -> TimeLocale -> String -> String -> t #
readSTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadS t #
readPTime :: ParseTime t => Bool -> TimeLocale -> String -> ReadP t #
Arguments
:: ParseTime t | |
=> TimeLocale | Time locale. |
-> String | Format string. |
-> String | Input string. |
-> Maybe t | The time value, or |
Deprecated: use "parseTimeM True" instead
Arguments
:: ParseTime t | |
=> TimeLocale | Time locale. |
-> String | Format string. |
-> String | Input string. |
-> t | The time value. |
Deprecated: use "parseTimeOrError True" instead
Arguments
:: ParseTime t | |
=> TimeLocale | Time locale. |
-> String | Format string |
-> ReadS t |
Deprecated: use "readSTime True" instead
Locale
data TimeLocale #
Constructors
TimeLocale | |
Fields
|
Instances
Show TimeLocale | |
Defined in Data.Time.Format.Locale Methods showsPrec :: Int -> TimeLocale -> ShowS show :: TimeLocale -> String showList :: [TimeLocale] -> ShowS | |
Eq TimeLocale | |
Defined in Data.Time.Format.Locale | |
Ord TimeLocale | |
Defined in Data.Time.Format.Locale Methods compare :: TimeLocale -> TimeLocale -> Ordering (<) :: TimeLocale -> TimeLocale -> Bool (<=) :: TimeLocale -> TimeLocale -> Bool (>) :: TimeLocale -> TimeLocale -> Bool (>=) :: TimeLocale -> TimeLocale -> Bool max :: TimeLocale -> TimeLocale -> TimeLocale min :: TimeLocale -> TimeLocale -> TimeLocale | |
Hashable TimeLocale | |
Defined in Data.Time.Orphans |
iso8601DateFormat :: Maybe String -> String #
rfc822DateFormat :: String #