add()

Add number of days to a Date.

Signature

add(count: Number, units String): Date

Description

Gets the date for count added to the instance Date.

Parameters

Parameter Type Required Description

count

Number

Yes

Number of units to add to the given date.

units

Number

Yes

Units of count. Must be days and case is significant.

Return value

Type Description

Date

Date of count added to the instance date.

Examples

Date('2023-02-10').add(19, 'days')
2023-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!