instance method prev_day

Ruby on Rails 6.0.6

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

prev_day(days = 1)

Returns a new time the specified number of days ago.

Parameters

days opt = 1
Source
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 318
  def prev_day(days = 1)
    advance(days: -days)
  end

Defined in activesupport/lib/active_support/core_ext/time/calculations.rb line 318 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Time

Type at least 2 characters to search.

↑↓ navigate · open · esc close