DayPilot.Date.toDate

Returns a Date object that holds the date and time value as a UTC base of the Date object.

Declaration

DayPilot.Date.toDate()

Return Value

Date object that represents the DayPilot.Date value as a UTC time.

Example

var today = DayPilot.Date.today();            // DayPilot.Date {value: "2018-01-01T00:00:00"}
var todayString = today.toString();    // "2018-01-01T00:00:00"
var utcToday = today.toDate();  // Mon Jan 01 2018 01:00:00 GMT+0100 (Central European Standard Time) var utcTodayString = utcToday.toISOString(); // "2018-01-01T00:00:00.000Z"

See Also