HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

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.