diff options
-rw-r--r-- | Plugins/Date.hs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Plugins/Date.hs b/Plugins/Date.hs index 115cb96..02b1cb3 100644 --- a/Plugins/Date.hs +++ b/Plugins/Date.hs @@ -26,13 +26,11 @@ data Date = Date String String Int deriving (Read, Show) instance Exec Date where - start (Date f _ r) cb = date f r cb - alias (Date _ a _) = a + alias (Date _ a _) = a + run (Date f _ _) = date f + rate (Date _ _ r) = r -date :: String -> Int -> (String -> IO ()) -> IO () -date format r cb = do go - where go = do - t <- toCalendarTime =<< getClockTime - cb $ formatCalendarTime defaultTimeLocale format t - tenthSeconds r >> go -
\ No newline at end of file +date :: String -> IO String +date format = do + t <- toCalendarTime =<< getClockTime + return $ formatCalendarTime defaultTimeLocale format t |