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

Modulehourglass-0.2.12Haskell2010

Data.Hourglass.Epoch

Epoch tracking

Contents
  1. computer time tracking with various epoch
  2. Epoch
  3. standard and usual epochs
Synopsis
  • Packagehourglass-0.2.12
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceEpoch.hs

computer time tracking with various epoch

newtypenewtype ElapsedSince epoch

A number of seconds elapsed since an epoch.

Constructors

Instances9Eq, Data, Num, Ord, Read, Show, …
datadata ElapsedSinceP epoch

A number of seconds and nanoseconds elapsed since an epoch.

Constructors

Instances9Eq, Data, Num, Ord, Read, Show, …

Epoch

classclass Epoch epoch where

epoch related.

We use the well known Unix epoch as the reference timezone for doing conversion between epochs.

Each methods of this typeclass should not use the actual value, but only get the information needed from the type itself.

Methods

  • epochName :: epoch -> String

    The name of this epoch

  • epochDiffToUnix :: epoch -> Seconds

    number of seconds of difference with 1st January 1970.

    a negative number means that this epoch start before the unix epoch.

Instances2Epoch

standard and usual epochs