diff options
Diffstat (limited to 'src/Utility/EventCache.hs')
-rw-r--r-- | src/Utility/EventCache.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Utility/EventCache.hs b/src/Utility/EventCache.hs index 58cd2c0..e97cc1b 100644 --- a/src/Utility/EventCache.hs +++ b/src/Utility/EventCache.hs @@ -69,7 +69,12 @@ parseEventsCSV :: String -> [Reminder] parseEventsCSV = undefined makeEventsCSV :: [Reminder] -> String -makeEventsCSV = undefined +makeEventsCSV = unlines . foldr ((:) . makeEventCSV) [] + +makeEventCSV :: Reminder -> String +makeEventCSV r = (show . getReminderHour $ r) ++ "," ++ + (show . getReminderMinute $ r) ++ "," + ++ getReminderText r todaysCacheFileDateString :: IO String todaysCacheFileDateString = showGregorian . utctDay <$> getCurrentTime |