-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Print time information in friendly ways -- -- Print time information in friendly ways @package friendly-time @version 0.3 -- | Prints a UTCTime as a few seconds ago or 3 -- days ago and similar. module Data.Time.Format.Human -- | Based on humanReadableTimeDiff found in -- https://github.com/snoyberg/haskellers/blob/master/Haskellers.hs, -- https://github.com/snoyberg/haskellers/blob/master/LICENSE humanReadableTime :: UTCTime -> IO String -- | A pure form, takes current time as an argument humanReadableTime' :: UTCTime -> UTCTime -> String -- | I18N version of humanReadableTime humanReadableTimeI18N :: HumanTimeLocale -> UTCTime -> IO String -- | I18N version of humanReadableTime' humanReadableTimeI18N' :: HumanTimeLocale -> UTCTime -> UTCTime -> String data HumanTimeLocale HumanTimeLocale :: String -> (String -> String) -> String -> (String -> String) -> String -> (String -> String) -> (Int -> String -> String) -> (String -> String) -> (String -> String) -> (String -> String) -> (String -> String) -> TimeLocale -> String -> String -> String -> HumanTimeLocale justNow :: HumanTimeLocale -> String secondsAgo :: HumanTimeLocale -> String -> String oneMinuteAgo :: HumanTimeLocale -> String minutesAgo :: HumanTimeLocale -> String -> String oneHourAgo :: HumanTimeLocale -> String aboutHoursAgo :: HumanTimeLocale -> String -> String -- | Used when time difference is more than 24 hours but less than 5 days. -- First argument is the day of week of the older time, second is string -- formatted with dayOfWeekFmt. at :: HumanTimeLocale -> Int -> String -> String daysAgo :: HumanTimeLocale -> String -> String weekAgo :: HumanTimeLocale -> String -> String weeksAgo :: HumanTimeLocale -> String -> String onYear :: HumanTimeLocale -> String -> String locale :: HumanTimeLocale -> TimeLocale -- | Time format used with at member. See Data.Time.Format -- for details on formatting sequences. dayOfWeekFmt :: HumanTimeLocale -> String -- | Time format used when time difference is less than a year but more -- than a month. Time formatted using this string will be passed to -- onYear. thisYearFmt :: HumanTimeLocale -> String -- | Time format used when time difference is at least one year. Time -- formatted using this string will be passed to onYear. prevYearFmt :: HumanTimeLocale -> String -- | Default human time locale uses English. defaultHumanTimeLocale :: HumanTimeLocale