Duration data type

The Duration data type converts duration to a number. Duration values are serialized as integers in seconds.

Example Duration values:

  • 3.seconds
  • 5.minutes
  • 7.days
  • 12.months
  • 2.years

Syntax

now.to_i + 1.minute

Sample usage

FormulaResult
now.to_i + 1.6current time + 96 seconds
now.to_i + 24.hourscurrent time + 86400

Last updated: