2 % (c) The GRASP/AQUA Project, Glasgow University, 1995-99
4 \section[Time]{Haskell 1.4 Locale Library}
8 module Locale(TimeLocale(..), defaultTimeLocale) where
10 import Prelude -- so as to force recompilations when reqd.
12 data TimeLocale = TimeLocale {
13 wDays :: [(String, String)], -- full and abbreviated week days
14 months :: [(String, String)], -- full and abbreviated months
15 amPm :: (String, String), -- AM/PM symbols
16 dateTimeFmt, dateFmt, -- formatting strings
17 timeFmt, time12Fmt :: String
18 } deriving (Eq, Ord, Show)
20 defaultTimeLocale :: TimeLocale
21 defaultTimeLocale = TimeLocale {
22 wDays = [("Sunday", "Sun"), ("Monday", "Mon"),
23 ("Tuesday", "Tue"), ("Wednesday", "Wed"),
24 ("Thursday", "Thu"), ("Friday", "Fri"),
27 months = [("January", "Jan"), ("February", "Feb"),
28 ("March", "Mar"), ("April", "Apr"),
29 ("May", "May"), ("June", "Jun"),
30 ("July", "Jul"), ("August", "Aug"),
31 ("September", "Sep"), ("October", "Oct"),
32 ("November", "Nov"), ("December", "Dec")],
35 dateTimeFmt = "%a %b %e %H:%M:%S %Z %Y",
38 time12Fmt = "%I:%M:%S %p"