instance method
end_of_year
Ruby on Rails 8.0.4
Since v4.0.13Signature
end_of_year()
Returns a new date/time representing the end of the year. DateTime objects will have a time set to 23:59:59.
Source
# File activesupport/lib/active_support/core_ext/date_and_time/calculations.rb, line 304
def end_of_year
change(month: 12).end_of_month
end
Defined in activesupport/lib/active_support/core_ext/date_and_time/calculations.rb line 304
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in DateAndTime::Calculations