Search
DateTime.today Method
See Also
 






Returns a DateTime object representing the current Date.

Namespace: MindFusion.Scheduling
File: DateTime.js

 Syntax

JavaScript  Copy Code

function today ()

 Return Value

The DateTime object representing the current Date.

 Example

The following code creates a new item for a birthday celebration that takes the whole present 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