class method
self.beginning_of_week
Ruby on Rails 8.1.2
Since v4.0.13Signature
self.beginning_of_week()
Returns the week start (e.g. :monday) for the current request, if this has been set (via Date.beginning_of_week=). If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. If no config.beginning_of_week was specified, returns :monday.
Source
# File activesupport/lib/active_support/core_ext/date/calculations.rb, line 19
def beginning_of_week
::ActiveSupport::IsolatedExecutionState[:beginning_of_week] || beginning_of_week_default || :monday
end
Defined in activesupport/lib/active_support/core_ext/date/calculations.rb line 19
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Date