diff options
Diffstat (limited to 'Utility/HumanTime.hs')
-rw-r--r-- | Utility/HumanTime.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Utility/HumanTime.hs b/Utility/HumanTime.hs index ca631dbb1..038d1228e 100644 --- a/Utility/HumanTime.hs +++ b/Utility/HumanTime.hs @@ -17,10 +17,10 @@ parseDuration s = do num <- readish s :: Maybe Integer units <- findUnits =<< lastMaybe s return $ fromIntegral num * units - where - findUnits 's' = Just 1 - findUnits 'm' = Just 60 - findUnits 'h' = Just $ 60 * 60 - findUnits 'd' = Just $ 60 * 60 * 24 - findUnits 'y' = Just $ 60 * 60 * 24 * 365 - findUnits _ = Nothing + where + findUnits 's' = Just 1 + findUnits 'm' = Just 60 + findUnits 'h' = Just $ 60 * 60 + findUnits 'd' = Just $ 60 * 60 * 24 + findUnits 'y' = Just $ 60 * 60 * 24 * 365 + findUnits _ = Nothing |