logfmt-0.0.1: Formatting
Safe HaskellNone
LanguageHaskell2010

Data.Fmt.Time

Contents

Synopsis

Documentation

time :: (IsString m, FormatTime a) => String -> Fmt1 m s a #

A custom time formatter.

For example, the E.U. formatting convention is time "%Y-%m-%d %T %z"

Time

t :: (IsString m, ISO8601 a) => Fmt1 m s a #

ISO-8601 time: 2021-06-05T01:46:46.173677-07:00

hm :: (IsString m, FormatTime a) => Fmt1 m s a #

Hour-minute of day: %H:%M.

hms :: (IsString m, FormatTime a) => Fmt1 m s a #

Hour-minute-second of day: %H:%M:%S.

day :: (IsString m, FormatTime a) => Fmt1 m s a #

Day of month: 01 - 31.

day' :: (IsString m, FormatTime a) => Fmt1 m s a #

Day of week: Sun - Sat.

month :: (IsString m, FormatTime a) => Fmt1 m s a #

Month of year: 01 - 12.

month' :: (IsString m, FormatTime a) => Fmt1 m s a #

Month of year: Jan - Dec.

year :: (IsString m, FormatTime a) => Fmt1 m s a #

Year.

unix :: (IsString m, FormatTime a) => Fmt1 m s a #

Seconds from Unix epoch.

zone :: (IsString m, FormatTime a) => Fmt1 m s a #

Timezone offset: -HHMM.

Duration

secs :: IsString m => Int -> Fmt1 m s Double #

Display to a given precision the absolute value time span in seconds.

mins :: IsString m => Int -> Fmt1 m s Double #

Display to a given precision the absolute value time span in minutes.

hours :: IsString m => Int -> Fmt1 m s Double #

Display to a given precision the absolute value time span in hours.

days :: IsString m => Int -> Fmt1 m s Double #

Display to a given precision the absolute value time span in days.

years :: IsString m => Int -> Fmt1 m s Double #

Display to a given precision the absolute value time span in years.