{-# LANGUAGE CPP #-}
module Database.HDBC.Locale
(
defaultTimeLocale,
iso8601DateFormat
)
where
#ifdef MIN_TIME_15
import Data.Time.Format (defaultTimeLocale)
#else
import System.Locale (defaultTimeLocale)
#endif
iso8601DateFormat :: Maybe String -> String
iso8601DateFormat :: Maybe String -> String
iso8601DateFormat mTimeFmt :: Maybe String
mTimeFmt =
"%Y-%m-%d" String -> String -> String
forall a. [a] -> [a] -> [a]
++ case Maybe String
mTimeFmt of
Nothing -> ""
Just fmt :: String
fmt -> ' ' Char -> String -> String
forall a. a -> [a] -> [a]
: String
fmt