diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-10 14:12:24 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-10 14:12:24 -0400 |
commit | bf726fb2c0ec8cf0e306843d34df6d052b9a1936 (patch) | |
tree | a3dab8ba7134f324eb84b5f40336484d90095c71 | |
parent | 55ceb9b581698471de7ea9c77843c08791ae2faa (diff) |
0 pad minutes
-rw-r--r-- | Utility/Scheduled.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs index a0b0bb964..8b7c91fd5 100644 --- a/Utility/Scheduled.hs +++ b/Utility/Scheduled.hs @@ -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 |