PP.Date.add(date, interval, value): Date;
date. Date. Date
interval. PP.Date.interval. Unit of added time interval.
value. Number. Number of intervals.
The add static method adds a time interval to date.
The method returns an object of the Date type.
To execute the example, add a link to PP.js scenario file to HTML page.
// Create the current date date = new Date(); // Add 5 days to the current date newDate = PP.Date.add(date, PP.Date.Interval.Day, 5); console.log(newDate);
After executing the example a new date is obtained.
See also: