HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleformatting-7.2.0Haskell2010

Formatting.Time

Formatters for time.

  • 51 values
  • Packageformatting-7.2.0
  • Exports51
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTime.hs
valuepico :: FormatTime a => Format r (a -> r)
#

Picosecond, including trailing zeros, 000000000000 - 999999999999.

valuedecimals :: FormatTime a => Format r (a -> r)
#

Decimal point and up to 12 second decimals, without trailing zeros. For a whole number of seconds, this produces the empty string.

valuediff
  1. :: RealFrac n
  2. => Bool

    Display 'in/ago'?

  3. -> Format r (n -> r)

    Example: '3 seconds ago', 'in three days'.)

#

Display a time span as one time relative to another. Input is assumed to be seconds. Typical inputs are NominalDiffTime and DiffTime.

valueyears
  1. :: RealFrac n
  2. => Int

    Decimal places.

  3. -> Format r (n -> r)
#

Display the absolute value time span in years.

valuedays
  1. :: RealFrac n
  2. => Int

    Decimal places.

  3. -> Format r (n -> r)
#

Display the absolute value time span in days.

valuehours
  1. :: RealFrac n
  2. => Int

    Decimal places.

  3. -> Format r (n -> r)
#

Display the absolute value time span in hours.

valuediffComponents :: RealFrac n => Format r (n -> r)
#

Display seconds in the following pattern: 00:00:00:00, which ranges from days to seconds.