-- 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.4.1 -- | Print 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 -> (Bool -> String -> String) -> (Bool -> String) -> (Bool -> String -> String) -> (Bool -> String) -> (Bool -> String -> String) -> (Int -> String -> String) -> (Bool -> String -> String) -> (Bool -> String -> String) -> (Bool -> String -> String) -> (String -> String) -> TimeLocale -> TimeZone -> String -> String -> String -> HumanTimeLocale [justNow] :: HumanTimeLocale -> String [secondsAgo] :: HumanTimeLocale -> Bool -> String -> String [oneMinuteAgo] :: HumanTimeLocale -> Bool -> String [minutesAgo] :: HumanTimeLocale -> Bool -> String -> String [oneHourAgo] :: HumanTimeLocale -> Bool -> String [aboutHoursAgo] :: HumanTimeLocale -> Bool -> 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 -> Bool -> String -> String [weekAgo] :: HumanTimeLocale -> Bool -> String -> String [weeksAgo] :: HumanTimeLocale -> Bool -> String -> String [onYear] :: HumanTimeLocale -> String -> String [locale] :: HumanTimeLocale -> TimeLocale [timeZone] :: HumanTimeLocale -> TimeZone -- | 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 module Data.Time.Format.Human.Locales -- | Spanish human time locale. spanishHumanTimeLocale :: HumanTimeLocale