package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Defines the internal Michelson representation for timestamps and basic operations that can be performed on it.

type t

Representation of timestamps specific to the Michelson interpreter. A number of seconds since the epoch.

val of_int64 : int64 -> t

Convert a number of seconds since the epoch to a timestamp.

val compare : t -> t -> int

Compare timestamps. Returns 1 if the first timestamp is later than the second one; 0 if they're equal and -1 othwerwise.

val to_notation : t -> string option

Convert a timestamp to RFC3339 notation if possible *

val to_num_str : t -> string

Convert a timestamp to a string representation of the seconds

val to_string : t -> string

Convert to RFC3339 notation if possible, or num if not

val of_string : string -> t option

Returns difference between timestamps as integral number of seconds in Michelson representation of numbers.

Add a number of seconds to the timestamp.

Subtract a number of seconds from the timestamp.

val to_zint : t -> Z.t
val of_zint : Z.t -> t
val encoding : t Data_encoding.t
OCaml

Innovation. Community. Security.