The fromYearMonthDay() method returns a DayPilot.Date instance representing the specified day.
Declaration
DayPilot.Date.fromYearMonthDay(year[, month, [day]])Parameters
year(number) - yearmonth(number) - month; optional, defaults to1if not specifiedday(number) - day of the month; optional, defaults to1if not specified
Return Value
Returns a DayPilot.Date instance representing the specified day.
Notes
This is a static method.
Example
const day1 = DayPilot.Date.fromYearMonthDay(2016); // 2016-01-01
const day2 = DayPilot.Date.fromYearMonthDay(2016, 2); // 2016-02-01
const day3 = DayPilot.Date.fromYearMonthDay(2016, 2, 29); // 2016-02-29See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot