date.addHours()

The time.addHours() API adds the number of hours that are passed to the date or time.

Parameters


  • Numeric Value

Return Value


Date or time with specified number of hours added.

RPG Equivalent


%HOURS()

Examples


pjs.define("time", { type: 'time', initValue: '12:00:00'});

time = time.addHours(1);

return time;
//13:00:00