The toDateLocal() method returns a Date object that holds the date and time value as a local date.
DayPilot.Date.toDateLocal()
Date object that represents the DayPilot.Date value as a local date/time.
var today = DayPilot.Date.today(); // DayPilot.Date {value: "2018-01-01T00:00:00"}
var todayString = today.toString(); // "2018-01-01T00:00:00"
var localToday = today.toDateLocal(); // Mon Jan 01 2018 00:00:00 GMT+0100 (Central European Standard Time) var localTodayString = localToday.toISOString(); // "2017-12-31T23:00:00.000Z"