instance method all_week

Ruby on Rails 4.0.13

Since v3.2.22.5 Last seen in v4.0.13

Available in: v3.2.22.5 v4.0.13

Signature

all_week(start_day = Date.beginning_of_week)

Returns a Range representing the whole week of the current time. Week starts on start_day, default is Date.week_start or config.week_start when set.

Parameters

start_day opt = Date.beginning_of_week
Source
# File activesupport/lib/active_support/core_ext/time/calculations.rb, line 230
  def all_week(start_day = Date.beginning_of_week)
    beginning_of_week(start_day)..end_of_week(start_day)
  end

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

Defined in Time

Type at least 2 characters to search.

↑↓ navigate · open · esc close