package tezos-protocol-013-PtJakart

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Tezos_protocol_environment_013_PtJakart.Time end
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
val equal : t -> t -> bool
val max : t -> t -> t
val min : t -> t -> t
val add : t -> int64 -> t
val diff : t -> t -> int64
val of_seconds : int64 -> t
val to_seconds : t -> int64
val of_notation : string -> t option
val of_notation_exn : string -> t
val to_notation : t -> string
type time = t

Internal timestamp representation.

Pretty-prints the time stamp using RFC3339 format.

val of_seconds_string : string -> time option

Parses RFC3339 representation and returns a timestamp.

val to_seconds_string : time -> string

Returns the timestamp encoded in RFC3339 format.

Adds a time span to a timestamp. This function fails on integer overflow

Returns the difference between two timestamps as a time span. This function fails when the difference is negative

val (-) : time -> Period_repr.t -> time

t - p Returns a timestamps p seconds before t.

TODO: https://gitlab.com/tezos/tezos/-/issues/2054 This function should be made available in the environment.

OCaml

Innovation. Community. Security.