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.

date.add()

Add number of days to a Date.

Signature

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

Description

Adds a number of days to a Date, returning the resulting Date.

Parameters

Parameter Type Required Description

amount

Number

true

Number of units to add to the given date.

unit

Number

true

Unit for the operation. Must be days (case-sensitive).

Return value

Type Description

Date

Date with the added days.

Examples

fqlCopied!
Date('2099-02-10').add(19, 'days')
Date("2099-03-01")

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!