class method
self.find_beginning_of_week!
Ruby on Rails 4.0.13
Since v4.0.13Signature
self.find_beginning_of_week!(week_start)
Returns week start day symbol (e.g. :monday), or raises an ArgumentError for invalid day symbol.
Parameters
-
week_startreq
Source
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 30
def find_beginning_of_week!(week_start)
raise ArgumentError, "Invalid beginning of week: #{week_start}" unless ::Date::DAYS_INTO_WEEK.key?(week_start)
week_start
end
Defined in activesupport/lib/active_support/core_ext/date/calculations.rb line 30
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Date