Method: Time#prev_year
- Defined in:
- lib/active_support/core_ext/time/calculations.rb
#prev_year(years = 1) ⇒ Object
Returns a new time the specified number of years ago.
371 372 373 |
# File 'lib/active_support/core_ext/time/calculations.rb', line 371 def prev_year(years = 1) advance(years: -years) end |