Search
DateTime.addMinutes Method (DateTime, Number)
See Also
 






Adds the specified number of minutes to the specified DateTime object.

Namespace: MindFusion.Scheduling
File: DateTime.js

 Syntax

JavaScript  Copy Code

function addMinutes (date, minutes)

 Parameters

date

DateTime. The DateTime instance to modify.

minutes

Number. The number of minutes to add.

 Return Value

DateTime. The modified DateTime instance.

 Example

The following code creates a new task that starts two minutes after the value of today:

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