summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/DateL.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/DateL.hs')
-rw-r--r--src/Plugins/DateL.hs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/Plugins/DateL.hs b/src/Plugins/DateL.hs
deleted file mode 100644
index d8859ed..0000000
--- a/src/Plugins/DateL.hs
+++ /dev/null
@@ -1,35 +0,0 @@
------------------------------------------------------------------------------
--- |
--- Module : Plugins.DateL
--- Copyright : (c) Andrea Rossato
--- License : BSD-style (see LICENSE)
---
--- Maintainer : Martin Perner <martin@perner.cc>
--- Stability : unstable
--- Portability : unportable
---
--- A date plugin with localization for Xmobar
---
------------------------------------------------------------------------------
-
-module Plugins.DateL (DateL(..)) where
-
-import Plugins
-import Localize
-
-import System.Time
-
-data DateL = DateL String String String Int
- deriving (Read, Show)
-
-instance Exec DateL where
- alias (DateL _ _ a _) = a
- start (DateL f l _ r) cb = do
- setupTimeLocale l
- go
- where go = date f >>= cb >> tenthSeconds r >> go
-
-date :: String -> IO String
-date format = do
- t <- toCalendarTime =<< getClockTime
- return $ formatCalendarTime getTimeLocale format t