diff --git a/docs/alpha/michelson.rst b/docs/alpha/michelson.rst index 0f9530a00dbabb8e5f23f84f32c29cf2fde23f81..65358465fb8f781ff09e865545775da799ddb126 100644 --- a/docs/alpha/michelson.rst +++ b/docs/alpha/michelson.rst @@ -1002,48 +1002,13 @@ Domain specific operations Operations on timestamps ~~~~~~~~~~~~~~~~~~~~~~~~ -Timestamps can be obtained by the ``NOW`` operation, or retrieved from -script parameters or globals. +A detailed description of the following instructions can be found in the `interactive Michelson reference manual `__. - ``ADD`` Increment / decrement a timestamp of the given number of - seconds. - -:: - - :: timestamp : int : 'S -> timestamp : 'S - :: int : timestamp : 'S -> timestamp : 'S - - > ADD / seconds : nat (t) : S => (seconds + t) : S - > ADD / nat (t) : seconds : S => (t + seconds) : S - -- ``SUB`` Subtract a number of seconds from a timestamp. - -:: - - :: timestamp : int : 'S -> timestamp : 'S - - > SUB / seconds : nat (t) : S => (seconds - t) : S - -- ``SUB`` Subtract two timestamps. - -:: - - :: timestamp : timestamp : 'S -> int : 'S - - > SUB / seconds(t1) : seconds(t2) : S => (t1 - t2) : S - -- ``COMPARE``: Timestamp comparison. - -:: - - :: timestamp : timestamp : 'S -> int : 'S - - > COMPARE / seconds(t1) : seconds(t2) : S => -1 : S - iff t1 < t2 - > COMPARE / seconds(t1) : seconds(t2) : S => 0 : S - iff t1 = t2 - > COMPARE / seconds(t1) : seconds(t2) : S => 1 : S - iff t1 > t2 + seconds (`documentation `__). +- ``SUB`` Subtract a number of seconds from a timestamp (`documentation `__). +- ``SUB`` Subtract two timestamps (`documentation `__). +- ``COMPARE``: Timestamp comparison (`documentation `__). Operations on Mutez