duration()
Returns an object representing a length of time.
duration (number num, String unit)
num: Type: number. The length of time in a given unit.
unit
Type: String
A datetime unit. The default is ‘milliseconds’. The options are ‘years, ‘months’, ‘weeks’, ‘days’, ‘hour’, ‘minutes’, ‘seconds’, ‘milliseconds’.
Type: Object A duration object.