| Tarantool[{ input }])

Since 2.10.0.

Create an object of the interval type from a table of time units. See description of units and examples below.

  • input (table) – Table with time units and parameters. For all possible time units, the values are not restricted. If an empty table or no arguments are passed, the interval object with the default value 0 seconds is created.




Possible input time units and parameters for ``

Name Description Type Default
nsec (usec, msec) Fractional part of the last second. You can specify either nanoseconds (nsec), or microseconds (usec), or milliseconds (msec). Specifying two of these units simultaneously or all three ones lead to an error. number 0
sec Seconds number 0
min Minutes number 0
hour Hours number 0
day Day number number 0
week Week number number 0
month Month number number 0
year Year number 0
adjust Defines how to round days in a month after an arithmetic operation. string ‘none’



- 0 seconds

tarantool> {
            month = 6,
            year = 1
- +1 years, 6 months

tarantool> {
            day = -1
- -1 days
Found what you were looking for?