Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Read locales on unix systems and parse them into their corresponding TimeLocale
representation.
- getLocale :: Maybe String -> IO TimeLocale
- getCurrentLocale :: IO TimeLocale
- parseLocale :: Parser TimeLocale
- data TimeLocale :: * = TimeLocale {}
- data LocaleParseException = LocaleParseException String
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 | |
|
data LocaleParseException Source #
Thrown when the locale cannot be parsed