diff options
author | Joris | 2015-11-21 21:41:38 +0100 |
---|---|---|
committer | Joris | 2015-11-21 21:41:38 +0100 |
commit | 5375ad26dd78220185f1ffe05222250c06dc1a0c (patch) | |
tree | 30998d4fe19206e8c5c9e564db116d2022e5e313 /src/Time.hs | |
parent | 7acd7a42f7663aa79d18e24bdb9fe19bf15f8fae (diff) |
Get next week birthdays and send an empty mail for the moment
Diffstat (limited to 'src/Time.hs')
-rw-r--r-- | src/Time.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Time.hs b/src/Time.hs new file mode 100644 index 0000000..97a9317 --- /dev/null +++ b/src/Time.hs @@ -0,0 +1,12 @@ +module Time + ( formatCurrentLocale + ) where + +import Data.Text (Text) +import qualified Data.Text as T +import Data.Time.LocalTime (getZonedTime) +import Data.Time.Format (formatTime, defaultTimeLocale) + +formatCurrentLocale :: Text -> IO Text +formatCurrentLocale format = + T.pack <$> formatTime defaultTimeLocale (T.unpack format) <$> getZonedTime |