DayPilot.Date.fromYearMonthDay

Returns a DayPilot.Date instance corresponding to the specified day

Declaration

DayPilot.Date.fromYearMonthDay(year[, month, [day]]);

Note that this is a "static" method. It needs to be invoked using the full prefix.

Parameters

  • year (int) -year
  • month (int) - month (optional; if not specified, 1 will be used)
  • day (int) - day of month (optional; if not specified, 1 will be used)

Example

var day1 = DayPilot.Date.fromYearMonthDay(2016); // 2016-01-01
var day2 = DayPilot.Date.fromYearMonthDay(2016, 2); // 2016-02-01
var day3 = DayPilot.Date.fromYearMonthDay(2016, 2, 29); // 2016-02-29

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java