inYears property

int get inYears

Returns the number of whole years spanned by this Duration.

Note: This calculation does not account for leap years.

Implementation

int get inYears => inDays ~/ 365;