Haskell Century From Year
centuryFromYear :: Int -> Int
centuryFromYear year = ceiling (fromIntegral year / 100 :: Double)
This converts a year into its century. Years 1-100 are century 1, 101-200 are century 2, and so on.
centuryFromYear :: Int -> Int
centuryFromYear year = ceiling (fromIntegral year / 100 :: Double)
This converts a year into its century. Years 1-100 are century 1, 101-200 are century 2, and so on.