Search
DateTime.addDays Method (Number)
See Also
 






Adds the specified number of days to the current DateTime object.

Namespace: MindFusion.Scheduling
File: DateTime.js

 Syntax

JavaScript  Copy Code

function addDays (days)

 Parameters

days

Number. The number of days to add.

 Example

The following code creates a new task that lasts two hours:

JavaScript  Copy Code

var date = p.DateTime.today();

// create a new item
item = new p.Item();
item.startTime = p.DateTime.addMinutes(date, 2);
item.endTime = p.DateTime.addHours(item.startTime, 2);
item.subject = "GYM";

 See Also