instance method end_of_year

Ruby on Rails 2.2.3

Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

end_of_year()

Returns a new Time representing the end of the year (31st of december; DateTime objects will have time set to 23:59:59)

Source
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 213
        def end_of_year
          self.acts_like?(:time) ? change(:month => 12,:day => 31,:hour => 23, :min => 59, :sec => 59) : change(:month => 12, :day => 31)
        end

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

Defined in ActiveSupport::CoreExtensions::Date::Calculations

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close