finished where indentation changes
This commit is contained in:
parent
b77290cecc
commit
f87a781aa6
68 changed files with 1619 additions and 1628 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue