aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Utility/EventCache.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utility/EventCache.hs')
-rw-r--r--src/Utility/EventCache.hs7
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