The Date.hourDiff() method returns the difference of hours between two different dates that are passedin hours.
Parameters
- Date
- Date
Return Value
Integer that is the difference Number of the hours between the two dates
Example
Code Block | ||
---|---|---|
| ||
pjs.define("time", { type: 'time', initValue: '12:00:00'}) pjs.define("time1", { type: 'time', initValue: '22:00:00'}); pjs.define("diff", { type: 'integer'} ); diff = Date.hourDiff(time1,time) return diff; //10 |