Portability | unportable |
---|---|
Stability | unstable |
Maintainer | pbrisbin@gmail.com |
Safe Haskell | None |
Prints a
as a few seconds ago or 3 days ago and similar.
UTCTime
- humanReadableTime :: UTCTime -> IO String
- humanReadableTime' :: UTCTime -> UTCTime -> String
- humanReadableTimeI18N :: HumanTimeLocale -> UTCTime -> IO String
- humanReadableTimeI18N' :: HumanTimeLocale -> UTCTime -> UTCTime -> String
- data HumanTimeLocale = HumanTimeLocale {
- justNow :: String
- secondsAgo :: String -> String
- oneMinuteAgo :: String
- minutesAgo :: String -> String
- oneHourAgo :: String
- aboutHoursAgo :: String -> String
- at :: Int -> String -> String
- daysAgo :: String -> String
- weekAgo :: String -> String
- weeksAgo :: String -> String
- onYear :: String -> String
- locale :: TimeLocale
- dayOfWeekFmt :: String
- thisYearFmt :: String
- prevYearFmt :: String
- defaultHumanTimeLocale :: HumanTimeLocale
Documentation
humanReadableTime :: UTCTime -> IO StringSource
Based on humanReadableTimeDiff
found in
https://github.com/snoyberg/haskellers/blob/master/Haskellers.hs,
https://github.com/snoyberg/haskellers/blob/master/LICENSE
A pure form, takes current time as an argument
humanReadableTimeI18N :: HumanTimeLocale -> UTCTime -> IO StringSource
I18N version of humanReadableTime
:: HumanTimeLocale | |
-> UTCTime | current time |
-> UTCTime | |
-> String |
I18N version of humanReadableTime'
data HumanTimeLocale Source
HumanTimeLocale | |
|
defaultHumanTimeLocale :: HumanTimeLocaleSource
Default human time locale uses English.