instance method all_week

Ruby on Rails 3.2.22.5

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 = :monday)

Returns a Range representing the whole week of the current time. Week starts on start_day (default is :monday, i.e. end of Sunday).

Parameters

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

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

Defined in Time

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