method Duration.prototype.toYears Duration.prototype.toYears(): number Converts the duration to years. Return Type number