interval_object | Tarantool

interval_object

object interval_object

Since 2.10.0.

interval_object:totable()

Convert the information from an interval object into the table format. Resulting table has the following fields:

Field name Description
nsec Nanosecods
sec Seconds
min Minutes
hour Hours
day Day number
month Month number
year Year
week Week number
adjust Defines how to round days in a month after an arithmetic operation.
Return:table with the date and time parameters
Rtype:table

Example:

tarantool> iv = datetime.interval.new{month = 1, adjust = 'last'}
---
...

tarantool> iv:totable()
---
- adjust: last
  sec: 0
  nsec: 0
  day: 0
  week: 0
  hour: 0
  month: 1
  year: 0
  min: 0
...
Found what you were looking for?
Feedback