The addHours method returns a new DayPilot.Date value with the specified number of hours added.
Declaration
DayPilot.Date.addHours(hours)Parameters
hours(number) - number of hours to add.
Possible Values
hours- integer hour offset added to the current value.
Notes
The current value is not changed. The method returns a new DayPilot.Date object.
Example
const start = new DayPilot.Date("2025-03-01T08:00:00");
const result = start.addHours(3);See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot