addDays

Prev Next

Description

Returns a DateTime object with a specified number of days added to today's date. Both positive and negative values are supported to either add or subtract the specified amount of time.


Input Parameters

Name Type Required Description
value Number Yes Number of days to add or subtract

Returns

Type: DateTime

Returns a new DateTime value with the adjusted time component.


Examples

// returns a new DateTime with 7 days added from today
var date = tools.addDays(7);
JavaScript
// returns a new DateTime with 7 days subtracted from today
var date = tools.addDays(-7);
JavaScript

Remarks

Use this helper function when you want to create offset DateTime values computed from today's date and time.