0 pad minutes

This commit is contained in:
Joey Hess 2013-10-10 14:12:24 -04:00
parent 6a331d1261
commit 7abe6cb161

View file

@ -185,7 +185,9 @@ toRecurrance s = case words s of
fromScheduledTime :: ScheduledTime -> String
fromScheduledTime AnyTime = "any time"
fromScheduledTime (SpecificTime h m) = show h ++ ":" ++ show m
fromScheduledTime (SpecificTime h m) = show h ++ ":" ++ pad 2 (show m)
where
pad n s = take (n - length s) (repeat '0') ++ s
toScheduledTime :: String -> Maybe ScheduledTime
toScheduledTime "any time" = Just AnyTime