add()

Add a time interval to Time.

Signature

add(count: Number, units: String): Time

Description

Add a time interval to Time.

Parameters

Parameter Type Required Description

count

Number

Yes

Count of number of units.

units

String

Yes

Time units:

nanoseconds
microseconds
milliseconds
seconds
minutes
hours
days

Return value

Type Description

Time

New time from count units added to instance Time rounded to the nearest nanosecond.

Examples

Time('2023-02-10T12:00:00.000Z').add(19, 'minutes')
023-02-10T12:19:00Z

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!