| Portability | unportable |
|---|---|
| Stability | unstable |
| Maintainer | pbrisbin@gmail.com |
| Safe Haskell | None |
Data.Time.Format.Human
Description
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 :: String -> String
- daysAgo :: String -> String
- weekAgo :: String -> String
- weeksAgo :: String -> String
- onYear :: String -> String
- locale :: TimeLocale
- 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
Arguments
| :: HumanTimeLocale | |
| -> UTCTime | current time |
| -> UTCTime | |
| -> String |
I18N version of humanReadableTime'
data HumanTimeLocale Source
Constructors
| HumanTimeLocale | |
Fields
| |