method

years

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

Returns a Duration instance matching the number of years provided.

2.years # => 2 years