Check out v4 of the Fauna CLI

v4 of the Fauna CLI is now in beta.

The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start.

time.add()

Add a time interval to a Time.

Signature

add(amount: Number, unit: String) => Time

Description

Add a time interval to Time.

Parameters

Parameter Type Required Description

amount

Number

true

Number of units to add to the given time.

unit

String

true

Unit for the operation. Accepts one of the following:

nanoseconds
microseconds
milliseconds
seconds
minutes
hours
days

Return value

Type Description

Time

New time with the added time interval, rounded to the nearest nanosecond.

Examples

Time('2099-02-10T12:00:00.000Z').add(19, 'minutes')
Time("2099-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!