method

years

v6.1.7.7 - Show latest stable - Class: Integer
years()
public

Returns a Duration instance matching the number of years provided.

2.years # => 2 years