1 module Data.Gargantext.Utils.DateUtils where
7 --readInt :: IO [Char] -> IO Int
10 --readBool :: IO [Char] -> IO Bool
13 utc2gregorian :: UTCTime -> (Integer, Int, Int)
14 utc2gregorian date = toGregorian $ utctDay date
16 gregorian2year :: (Integer, Int, Int) -> Integer
17 gregorian2year (y, m, d) = y
19 utc2year :: UTCTime -> Integer
20 utc2year date = gregorian2year $ utc2gregorian date
22 averageLength :: Fractional a => [[a1]] -> a
23 averageLength l = fromIntegral (sum (map length l)) / fromIntegral (length l)
27 -- c <- getCurrentTime
28 -- print c -- $ toYear $ toGregorian $ utctDay c
30 charToString :: Char -> String