Search
DateTime.clone Method
See Also
 






Returns a copy of the current DateTime object.

Namespace: MindFusion.Scheduling
File: DateTime.js

 Syntax

JavaScript  Copy Code

function clone ()

 Return Value

The cloned DateTime object.

 Example

The following code creates a new item for a birthday celebration that lasts one day:

JavaScript  Copy Code

var p = MindFusion.Scheduling;

var date = p.DateTime.today();

// create a new item
var item = new p.Item();
item.subject = "Birthday Celebration";   
item.startTime = date;
item.endTime = p.DateTime.addDays(date.clone(),1);
item.allDayEvent = true;

 See Also