durationInCenturies
Function
Definition
Package:@progress/kendo-date-math
Syntax:
ts
durationInCenturies(new Date(2016, 0, 1), new Date(3216, 0, 1)); // 12
durationInCenturies(new Date(2016, 6, 1), new Date(2617, 0, 1)); // 6
durationInCenturies(new Date(2016, 0, 1), new Date(2016, 0, 1)); // 0
A function that calculates duration in centuries between two Date objects.
Parameters:startDate
The start date value.
endDateThe end date value.
Returns:number
- The duration in months.