getYearsInDuration()

Returns the number of years in a duration.

getYearsInDuration(Duration duration)

duration: Type: Duration. The duration object returned by $A.localizationService.duration.

Type: number The number of years in the duration.

See Also