system-locale-0.2.0.0: Get system locales

Safe HaskellSafe
LanguageHaskell2010

System.Locale.Read

Description

Read locales on unix systems and parse them into their corresponding TimeLocale representation.

Synopsis

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 :: * #

Constructors

TimeLocale 

Fields