Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Read locales on unix systems and parse them into their corresponding TimeLocale
representation.
Synopsis
- getLocale :: Maybe String -> IO TimeLocale
- getCurrentLocale :: IO TimeLocale
- parseLocale :: Parser TimeLocale
- data TimeLocale = TimeLocale {}
- data LocaleParseException
Documentation
getLocale :: Maybe String -> IO TimeLocale Source #
Read a locale with LC_TIME
set according to the first argument.
Throws a LocaleParseException
if the output of calling locale
cannot be parsed.
The knownTimeZones
field will always be empty.
getLocale (Just "en_US.UTF-8")
getCurrentLocale :: IO TimeLocale Source #
Get the current locale of the process.
Throws a LocaleParseException
if the output of calling locale
cannot be parsed.
The knownTimeZones
field will always be empty.
parseLocale :: Parser TimeLocale Source #
Parser
for locales returned by the unix utility locale
data TimeLocale #
TimeLocale | |
|
Instances
Eq TimeLocale | |
Defined in Data.Time.Format.Locale (==) :: TimeLocale -> TimeLocale -> Bool # (/=) :: TimeLocale -> TimeLocale -> Bool # | |
Ord TimeLocale | |
Defined in Data.Time.Format.Locale compare :: TimeLocale -> TimeLocale -> Ordering # (<) :: TimeLocale -> TimeLocale -> Bool # (<=) :: TimeLocale -> TimeLocale -> Bool # (>) :: TimeLocale -> TimeLocale -> Bool # (>=) :: TimeLocale -> TimeLocale -> Bool # max :: TimeLocale -> TimeLocale -> TimeLocale # min :: TimeLocale -> TimeLocale -> TimeLocale # | |
Show TimeLocale | |
Defined in Data.Time.Format.Locale showsPrec :: Int -> TimeLocale -> ShowS # show :: TimeLocale -> String # showList :: [TimeLocale] -> ShowS # |
data LocaleParseException Source #
Thrown when the locale cannot be parsed
Instances
Eq LocaleParseException Source # | |
Defined in System.Locale.Read (==) :: LocaleParseException -> LocaleParseException -> Bool # (/=) :: LocaleParseException -> LocaleParseException -> Bool # | |
Show LocaleParseException Source # | |
Defined in System.Locale.Read showsPrec :: Int -> LocaleParseException -> ShowS # show :: LocaleParseException -> String # showList :: [LocaleParseException] -> ShowS # | |
Exception LocaleParseException Source # | |
Defined in System.Locale.Read |