Module NesDatetime

Datetime

type t
val equal : t -> t -> Ppx_deriving_runtime.bool
val compare : t -> t -> Ppx_deriving_runtime.int
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
val to_string : t -> string

Prints the date and time as an ISO 8601 string.

val pp : Stdlib.Format.formatter -> t -> unit
val now : unit -> t

Returns the current date and time.

val diff : t -> t -> float

Number of seconds between two datetimes.

val make_in_the_past : float -> t

Make a datetime in the past by the given number of seconds.

val make_in_the_future : float -> t

Make a datetime in the future by the given number of seconds.

val in_the_past : t -> bool

Whether the given datetime is in the past.