libjwt-typed-0.2: A Haskell implementation of JSON Web Token (JWT)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Libjwt.NumericDate

Description

POSIX seconds

Synopsis

Documentation

newtype NumericDate Source #

Represents the number of seconds elapsed since 1970-01-01

Used in accordance with the RFC in Exp, Nbf and Iat claims

Constructors

NumericDate 

now :: MonadTime m => m NumericDate Source #

Convert currentTime to a number of seconds since 1970-01-01

plusSeconds :: NumericDate -> NominalDiffTime -> NumericDate Source #

Add some seconds to the date

minusSeconds :: NumericDate -> NominalDiffTime -> NumericDate Source #

Subtract some seconds from the date

diffSeconds :: NumericDate -> NumericDate -> NominalDiffTime Source #

The number of seconds between two dates