instance method end_of_quarter

Ruby on Rails 3.1.12

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

end_of_quarter()

Returns a new Time representing the end of the quarter (end of the last day of march, june, september, december)

Source
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 225
  def end_of_quarter
    beginning_of_month.change(:month => [3, 6, 9, 12].detect { |m| m >= month }).end_of_month
  end

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

Defined in Time

Type at least 2 characters to search.

↑↓ navigate · open · esc close