Fixed Year bug
This commit is contained in:
parent
2611f8a8e2
commit
5d13596b6f
2
Main.hs
2
Main.hs
@ -33,7 +33,7 @@ instance Yesod ProtocolSeven
|
|||||||
getHomeR :: Handler Html
|
getHomeR :: Handler Html
|
||||||
getHomeR = defaultLayout $ do
|
getHomeR = defaultLayout $ do
|
||||||
-- Date / Time stuff
|
-- Date / Time stuff
|
||||||
sTimeDate <- io $ getZonedTime >>= return . (formatTime defaultTimeLocale "%y %m %d")
|
sTimeDate <- io $ getZonedTime >>= return . (formatTime defaultTimeLocale "%Y %m %d")
|
||||||
let (year, month, day) = (\[a,b,c] -> (a,b,c)) $ map (\x -> read x :: Integer) $ words sTimeDate
|
let (year, month, day) = (\[a,b,c] -> (a,b,c)) $ map (\x -> read x :: Integer) $ words sTimeDate
|
||||||
let nextMonth = (month + 1) `mod` 12
|
let nextMonth = (month + 1) `mod` 12
|
||||||
let ts = toTS (year, month, day)
|
let ts = toTS (year, month, day)
|
||||||
|
Loading…
Reference in New Issue
Block a user