instance method
end_of_quarter
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v3.2.22.5Signature
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