HORIZON HASKELLDocslts/ghc-9.14.x6d5fdfd2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 6d5fdfd · 2026-10-12

Moduleformatting-7.2.0Haskell2010

Formatting.Time

Formatters for time.

Synopsis
  • Packageformatting-7.2.0
  • Exports51
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTime.hs
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.