Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: elevation/event_calendar
base: master
...
head fork: parndt/event_calendar
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
2  README.rdoc
@@ -109,7 +109,7 @@ Some helper methods are created, but you could put this in the view. The key is
def event_calendar
calendar event_calendar_options do |event|
- %(<a href="/events/#{event.id}" title="#{h(event.name)}">#{h(event.name)}</a>)
+ %(<a href="/events/#{event.id}" title="#{h(event.title)}">#{h(event.title)}</a>)
end
end
end
View
18 app/views/calendar/_list_view.html.erb
@@ -0,0 +1,18 @@
+<h2>Upcoming Events</h2>
+<ul id='ec-list-view'>
+ <% @events.each do |event_container| %>
+ <li class='ec-list-day'>
+ <h2><%= (event_group = event_container.last).first.start_at.strftime("%d %B %Y") %></h2>
+ <ul>
+ <% event_group.each do |event| %>
+ <li>
+ <%= event.start_at.strftime("%I:%M %p") %> to <%= event.end_at.strftime("%I:%M %p") %>
+ <%=
+ block.call(event) # additional html supplied to helper
+ %>
+ </li>
+ <% end %>
+ </ul>
+ </li>
+ <% end %>
+</ul>
View
125 app/views/calendar/_month_view.html.erb
@@ -0,0 +1,125 @@
+<%
+ # make the height calculations
+ # tricky since multiple events in a day could force an increase in the set height
+ height = options[:day_names_height]
+
+ row_heights = cal_row_heights(options)
+ row_heights.each do |row_height|
+ height += row_height
+ end
+
+ # the first and last days of this calendar month
+ first = Date.civil(options[:year], options[:month], 1)
+ last = Date.civil(options[:year], options[:month], -1)
+%>
+<div class='ec-calendar' <%= "style='width: #{options[:width]}px;'" if options[:width] %>>
+ <table class='ec-calendar-header' cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <% if options[:previous_month_text] or options[:next_month_text] %>
+ <th colspan="2"><%= options[:previous_month_text] %></th>
+ <% colspan=3
+ else
+ colspan=7
+ end
+ %>
+ <th colspan="<%= colspan %>" class="ec-month-name"><%= options[:month_name_text] %></th>
+ <%= "<th colspan='2' class='ec-month-nav'>#{options[:next_month_text]}</th>" if options[:next_month_text] -%>
+ </tr>
+ </thead>
+ </table>
+
+ <div class='eb-body' style='height: <%= height %>px;'>
+ <table class='ec-day-names' style="height: <%= options[:day_names_height] %>px;" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <% @day_names.each do |day_name| -%>
+ <th class="ec-day-name" title="<%= day_name %>"><%= day_name.mb_chars[options[:abbrev]] %></th>
+ <% end -%>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="ec-rows" style="top: <%= options[:day_names_height] %>px; height: <%= height - options[:day_names_height] %>px;">
+ <%
+ first_day_of_week = beginning_of_week(first, options[:first_day_of_week])
+ last_day_of_week = end_of_week(first, options[:first_day_of_week])
+ last_day_of_cal = end_of_week(last, options[:first_day_of_week])
+ row_num = 0
+ top = 0
+
+ while(last_day_of_week <= last_day_of_cal) %>
+ <div class='ec-row' style='top: <%= top %>px; height: <%= row_heights[row_num] %>px;'>
+ <% top += row_heights[row_num] -%>
+ <table class="ec-row-bg" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <% first_day_of_week.upto(first_day_of_week+6) do |day| %>
+ <td class='ec-day-bg<%= " ec-today-bg" if (day == Date.today) %>'>&nbsp;</td>
+ <% end %>
+ </tr>
+ </tbody>
+ </table>
+ <table class="ec-row-table" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <%
+ first_day_of_week.upto(last_day_of_week) do |day|
+ css = []
+ css << "ec-today-header" if options[:show_today] and (day == Date.today)
+ css << "ec-other-month-header" if (day < first) || (day > last)
+ css << "ec-weekend-day-header" if weekend?(day)
+ %>
+ <td class='ec-day-header<%= " #{css.join(" ")}" unless css.empty? %>' style='height: <%= options[:day_nums_height] %>px;'>
+ <%= options[:link_to_day_action] ? day_link(day.day, day, options[:link_to_day_action]) : day.day %>
+ </td>
+ <% end %>
+ </tr>
+
+ <% options[:event_strips].each do |strip| %>
+ <tr>
+ <%
+ # go through through the strip, for the entries that correspond to the days of this week
+ strip[row_num*7, 7].each_with_index do |event, index|
+ day = first_day_of_week + index
+
+ if event
+ # get the dates of this event that fit into this week
+ dates = event.clip_range(first_day_of_week, last_day_of_week)
+ # if the event (after it has been clipped) starts on this date,
+ # then create a new cell that spans the number of days
+ if dates[0] == day.to_date %>
+
+ <td class='ec-event-cell' colspan='<%= (dates[1]-dates[0]).to_i + 1 %>' style='padding-top: <%= options[:event_margin] %>px'>
+ <div class='ec-event event_<%= event.id %>' style='background-color: <%= event.color %>;padding-top: <%= options[:event_padding_top] %>px; height: <%= options[:event_height] - options[:event_padding_top] %>px; '<%= " event_id='#{event.id}' color='#{event.color}' onmouseover='select_event(this, true);' onmouseout='select_event(this, false);'" if options[:use_javascript] %>>
+ <%= "<div class='ec-left-arrow'></div>" if event.start_at.to_date < dates[0] %>
+ <%= "<div class='ec-right-arrow'></div>" if event.end_at.to_date > dates[1] %>
+ <%= block.call(event) # additional html supplied to helper
+ %>
+ </div>
+ </td>
+ <%
+ end
+ else # there wasn't an event so create an empty cell and container
+ %>
+ <td class='ec-event-cell ec-no-event-cell' style='padding-top: <%= options[:event_margin] %>px;'>
+ <div class='ec-event' style='padding-top: <%= options[:event_padding_top] %>px;height: <%= options[:event_height] - options[:event_padding_top] %>;'>
+ &nbsp;
+ </div>
+ </td>
+ <% end %>
+ <% end %>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+ </div>
+ <%
+ row_num += 1
+ first_day_of_week += 7
+ last_day_of_week += 7
+ %>
+ <% end %>
+ </div>
+ </div>
+</div>
View
119 app/views/calendar/_old_month_view.html.erb
@@ -0,0 +1,119 @@
+<%
+ first = Date.civil(options[:year], options[:month], 1)
+ last = Date.civil(options[:year], options[:month], -1)
+
+ start = options[:start]
+ event_strips = options[:event_strips]
+ event_width = options[:event_width]
+ event_height = options[:event_height]
+ min_height = options[:min_height]
+ event_margin = options[:event_margin]
+
+ first_weekday = options[:first_day_of_week]
+ last_weekday = options[:first_day_of_week]
+
+ day_names = Date::DAYNAMES.dup
+ first_weekday.times do
+ day_names.push(day_names.shift)
+ end
+%>
+<table class='<%= options[:table_class] %>' width='<%= event_width * 7 %>' border='0' cellspacing='0' cellpadding='0'>
+ <thead>
+ <tr>
+ <% if options[:previous_month_text] or options[:next_month_text] %>
+ <th colspan="2"><%= options[:previous_month_text] %></th>
+ <% colspan=3
+ else
+ colspan=7
+ end
+ %>
+ <th colspan="<%= colspan %>" class="<%= options[:month_name_class] %>"><%= options[:month_name_text] %></th>
+ <%= "<th colspan='2'>#{options[:next_month_text]}</th>" if options[:next_month_text] %>
+ </tr>
+ <tr class="<%= options[:day_name_class] %>">
+ <%
+ day_names.each do |d|
+ unless d[options[:abbrev]].eql? d %>
+ <th scope="col"><span title="<%= d %>"><%= d[options[:abbrev]] %></span></th>
+ <% else %>
+ <th scope="col"><%= d[options[:abbrev]]%></th>
+ <% end
+ end
+ %>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <%#
+ other month days, before current month
+ %>
+ <% beginning_of_week(first, first_weekday).upto(first - 1) do |d| %>
+ <td class='<%= "#{options[:other_month_class]}#{ " weekendDay" if weekend?(d)}#{ " beginning_of_week" if d.wday == first_weekday}"%>'>
+ <%= d.day %>
+ <%= "<span class='hidden'>#{Date::MONTHNAMES[d.month]}</span>" if options[:accessible] %>
+ </td>
+ <% end unless first.wday == first_weekday %>
+ <%
+ start_row = beginning_of_week(first, first_weekday)
+ last_row = start_row
+ first.upto(last) do |cur|
+ cell_text, cell_attrs = nil#block.call(cur)
+ cell_text ||= cur.mday
+ cell_attrs ||= {:class => options[:day_class]}
+ cell_attrs[:class] += " weekendDay" if [0, 6].include?(cur.wday)
+ cell_attrs[:class] += " beginning_of_week" if cur.wday == first_weekday
+ cell_attrs[:class] += " today" if (cur == Date.today) and options[:show_today]
+ cell_attrs[:style] = "width:#{event_width-2}px;" # subtract 2 for the borders
+ cell_attrs = cell_attrs.map {|k, v| %(#{k}="#{v}") }.join(" ")
+ %>
+ <td <%= cell_attrs %>>
+ <% if options[:link_to_day_action] %>
+ <%= day_link(cell_text, cur, options[:link_to_day_action]) %>
+ <% else %>
+ <%= cell_text %>
+ <% end %>
+ </td>
+<%
+ if cur.wday == last_weekday
+ # calendar rows events
+ content = calendar_row(event_strips,
+ event_width,
+ event_height,
+ event_margin,
+ start_row,
+ last_row..cur,
+ options[:use_javascript],
+ &block)
+%>
+ </tr>
+ <%= event_row(content, min_height, event_height, event_margin) %>
+ <%= "<tr>" unless cur == last %>
+ <% last_row = cur + 1
+ end
+ end
+%>
+<%
+ # other month days, after current month, unless this month ended evenly on the last day of the week
+ if last+1 != beginning_of_week(last+1, first_weekday)
+ (last + 1).upto(beginning_of_week(last + 7, first_weekday) - 1) do |d| %>
+ <td class='<%= "#{options[:other_month_class]}#{ " weekendDay" if weekend?(d)}#{ " beginning_of_week" if d.wday == first_weekday}" %>' style="width: <%= event_width-2 %>px;">
+ <%= d.day %>
+ <%= "<span class='hidden'>#{Date::MONTHNAMES[d.mon]}</span>" if options[:accessible] %>
+ </td>
+<% end unless last.wday == last_weekday
+
+ # last calendar rows events
+ content = calendar_row(event_strips,
+ event_width,
+ event_height,
+ event_margin,
+ start_row,
+ last_row..(beginning_of_week(last + 7, first_weekday) - 1),
+ options[:use_javascript],
+ &block)
+%>
+ </tr>
+ <%= event_row(content, min_height, event_height, event_margin) %>
+<% end %>
+ </tbody>
+</table>
View
2  generators/event_calendar/templates/helper.rb.erb
@@ -17,7 +17,7 @@ module <%= view_name.classify %>Helper
def event_calendar
calendar event_calendar_opts do |event|
- %(<a href="/events/#{event.id}" title="#{h(event.name)}">#{h(event.name)}</a>)
+ %(<a href="/events/#{event.id}" title="#{h(event.title)}">#{h(event.title)}</a>)
end
end
end
View
44 lib/event_calendar.rb
@@ -1,21 +1,21 @@
module EventCalendar
-
+
module PluginMethods
def has_event_calendar
ClassMethods.setup_event_calendar_on self
end
end
-
+
# class Methods
module ClassMethods
-
+
def self.setup_event_calendar_on(recipient)
recipient.extend ClassMethods
recipient.class_eval do
include InstanceMethods
end
end
-
+
# For the given month, find the start and end dates
# Find all the events within this range, and create event strips for them
def event_strips_for_month(shown_date, first_day_of_week=0)
@@ -24,7 +24,7 @@ def event_strips_for_month(shown_date, first_day_of_week=0)
event_strips = create_event_strips(strip_start, strip_end, events)
event_strips
end
-
+
# Expand start and end dates to show the previous month and next month's days,
# that overlap with the shown months display
def get_start_and_end_dates(shown_date, first_day_of_week=0)
@@ -42,7 +42,7 @@ def get_start_and_end_dates(shown_date, first_day_of_week=0)
end
[strip_start, strip_end]
end
-
+
# Get the events overlapping the given start and end dates
def events_for_date_range(start_d, end_d)
self.find(
@@ -51,25 +51,25 @@ def events_for_date_range(start_d, end_d)
:order => 'start_at ASC'
)
end
-
+
# Create the various strips that show evetns
def create_event_strips(strip_start, strip_end, events)
# create an inital event strip, with a nil entry for every day of the displayed days
event_strips = [[nil] * (strip_end - strip_start + 1)]
-
+
events.each do |event|
cur_date = event.start_at.to_date
end_date = event.end_at.to_date
cur_date, end_date = event.clip_range(strip_start, strip_end)
start_range = (cur_date - strip_start).to_i
end_range = (end_date - strip_start).to_i
-
+
# make sure the event is within our viewing range
- if (start_range <= end_range) and (end_range >= 0)
+ if (start_range <= end_range) and (end_range >= 0)
range = start_range..end_range
-
+
open_strip = space_in_current_strips?(event_strips, range)
-
+
if open_strip.nil?
# no strips open, make a new one
new_strip = [nil] * (strip_end - strip_start + 1)
@@ -83,7 +83,7 @@ def create_event_strips(strip_start, strip_end, events)
end
event_strips
end
-
+
def space_in_current_strips?(event_strips, range)
open_strip = nil
for strip in event_strips
@@ -103,7 +103,7 @@ def space_in_current_strips?(event_strips, range)
end
open_strip
end
-
+
def days_between(first, second)
if first > second
second + (7 - first)
@@ -116,31 +116,31 @@ def beginning_of_week(date, start = 0)
days_to_beg = days_between(start, date.wday)
date - days_to_beg
end
-
+
end
-
+
# Instance Methods
module InstanceMethods
def year
date.year
end
-
+
def month
date.month
end
-
+
def day
date.day
end
-
+
def color
self[:color] || '#9aa4ad'
end
-
+
def days
end_at.to_date - start_at.to_date
end
-
+
# start_d - start of the month, or start of the week
# end_d - end of the month, or end of the week
def clip_range(start_d, end_d)
@@ -154,7 +154,7 @@ def clip_range(start_d, end_d)
else
clipped_start = start_at_d
end
-
+
# Clip end date
if (end_at_d > end_d)
clipped_end = end_d
View
206 lib/event_calendar/calendar_helper.rb
@@ -1,6 +1,6 @@
module EventCalendar
module CalendarHelper
-
+
# Returns an HTML calendar which can show multiple, overlapping events across calendar days and rows.
# Customize using CSS, the below options, and by passing in a code block.
#
@@ -26,7 +26,7 @@ module CalendarHelper
# :event_margin => 1 # Spacing of the event rows
# :event_padding_top => 1 # Padding on the top of the event rows (increase to move text down)
# :use_javascript => true # Outputs HTML with inline javascript so events spanning multiple days will be highlighted.
- # If this option is false, cleaner HTML will be output, but events spanning multiple days will
+ # If this option is false, cleaner HTML will be output, but events spanning multiple days will
# not be highlighted correctly on hover, so it is only really useful if you know your calendar
# will only have single-day events. Defaults to true.
# :link_to_day_action => false # If controller action is passed,
@@ -38,7 +38,7 @@ module CalendarHelper
#
def calendar(options = {}, &block)
block ||= Proc.new {|d| nil}
-
+
defaults = {
:year => Time.zone.now.year,
:month => Time.zone.now.month,
@@ -49,200 +49,42 @@ def calendar(options = {}, &block)
:previous_month_text => nil,
:next_month_text => nil,
:event_strips => [],
-
+
# it would be nice to have these in the CSS file
# but they are needed to perform height calculations
:width => nil,
- :height => 500,
+ :height => 500,
:day_names_height => 18,
:day_nums_height => 18,
:event_height => 18,
:event_margin => 1,
:event_padding_top => 1,
-
+
:use_javascript => true,
- :link_to_day_action => false
+ :link_to_day_action => false,
+ :calendar_view => "month"
}
options = defaults.merge options
-
- # default month name for the given number
- options[:month_name_text] ||= Date::MONTHNAMES[options[:month]]
-
- # make the height calculations
- # tricky since multiple events in a day could force an increase in the set height
- height = options[:day_names_height]
- row_heights = cal_row_heights(options)
- row_heights.each do |row_height|
- height += row_height
- end
-
- # the first and last days of this calendar month
- first = Date.civil(options[:year], options[:month], 1)
- last = Date.civil(options[:year], options[:month], -1)
-
+
# create the day names array [Sunday, Monday, etc...]
- day_names = Date::DAYNAMES.dup
+ @day_names = Date::DAYNAMES.dup
options[:first_day_of_week].times do
- day_names.push(day_names.shift)
- end
-
- # Build the HTML string
- cal = ""
-
- # outer calendar container
- cal << %(<div class="ec-calendar")
- cal << %(style="width: #{options[:width]}px;") if options[:width]
- cal << %(>)
-
- # table header, including the monthname and links to prev & next month
- cal << %(<table class="ec-calendar-header" cellpadding="0" cellspacing="0">)
- cal << %(<thead><tr>)
- if options[:previous_month_text] or options[:next_month_text]
- cal << %(<th colspan="2" class="ec-month-nav">#{options[:previous_month_text]}</th>)
- colspan = 3
- else
- colspan = 7
- end
- cal << %(<th colspan="#{colspan}" class="ec-month-name">#{options[:month_name_text]}</th>)
- if options[:next_month_text]
- cal << %(<th colspan="2" class="ec-month-nav">#{options[:next_month_text]}</th>)
+ @day_names.push(day_names.shift)
end
- cal << %(</tr></thead></table>)
-
- # body container (holds day names and the calendar rows)
- cal << %(<div class="ec-body" style="height: #{height}px;">)
-
- # day names
- cal << %(<table class="ec-day-names" style="height: #{options[:day_names_height]}px;" cellpadding="0" cellspacing="0">)
- cal << %(<tbody><tr>)
- day_names.each do |day_name|
- cal << %(<th class="ec-day-name" title="#{day_name}">#{day_name.mb_chars[options[:abbrev]]}</th>)
- end
- cal << %(</tr></tbody></table>)
-
- # container for all the calendar rows
- cal << %(<div class="ec-rows" style="top: #{options[:day_names_height]}px; )
- cal << %(height: #{height - options[:day_names_height]}px;">)
-
- # initialize loop variables
- first_day_of_week = beginning_of_week(first, options[:first_day_of_week])
- last_day_of_week = end_of_week(first, options[:first_day_of_week])
- last_day_of_cal = end_of_week(last, options[:first_day_of_week])
- row_num = 0
- top = 0
-
- # go through a week at a time, until we reach the end of the month
- while(last_day_of_week <= last_day_of_cal)
- cal << %(<div class="ec-row" style="top: #{top}px; height: #{row_heights[row_num]}px;">)
- top += row_heights[row_num]
-
- # this weeks background table
- cal << %(<table class="ec-row-bg" cellpadding="0" cellspacing="0">)
- cal << %(<tbody><tr>)
- first_day_of_week.upto(first_day_of_week+6) do |day|
- today_class = (day == Date.today) ? "ec-today-bg" : ""
- cal << %(<td class="ec-day-bg #{today_class}">&nbsp;</td>)
- end
- cal << %(</tr></tbody></table>)
-
- # calendar row
- cal << %(<table class="ec-row-table" cellpadding="0" cellspacing="0">)
- cal << %(<tbody>)
-
- # day numbers row
- cal << %(<tr>)
- first_day_of_week.upto(last_day_of_week) do |day|
- cal << %(<td class="ec-day-header )
- cal << %(ec-today-header ) if options[:show_today] and (day == Date.today)
- cal << %(ec-other-month-header ) if (day < first) || (day > last)
- cal << %(ec-weekend-day-header) if weekend?(day)
- cal << %(" style="height: #{options[:day_nums_height]}px;">)
- if options[:link_to_day_action]
- cal << day_link(day.day, day, options[:link_to_day_action])
- else
- cal << %(#{day.day})
- end
- cal << %(</td>)
- end
- cal << %(</tr>)
-
- # event rows for this day
- # for each event strip, create a new table row
- options[:event_strips].each do |strip|
- cal << %(<tr>)
- # go through through the strip, for the entries that correspond to the days of this week
- strip[row_num*7, 7].each_with_index do |event, index|
- day = first_day_of_week + index
-
- if event
- # get the dates of this event that fit into this week
- dates = event.clip_range(first_day_of_week, last_day_of_week)
- # if the event (after it has been clipped) starts on this date,
- # then create a new cell that spans the number of days
- if dates[0] == day.to_date
-
- cal << %(<td class="ec-event-cell" colspan="#{(dates[1]-dates[0]).to_i + 1}" )
- cal << %(style="padding-top: #{options[:event_margin]}px;">)
- cal << %(<div class="ec-event event_#{event.id}" )
- cal << %(style="background-color: #{event.color}; )
- cal << %(padding-top: #{options[:event_padding_top]}px; )
- cal << %(height: #{options[:event_height] - options[:event_padding_top]}px;" )
- if options[:use_javascript]
- cal << %(event_id="#{event.id}" color="#{event.color}" )
- cal << %(onmouseover="select_event(this, true);" onmouseout="select_event(this, false);" )
- end
- cal << %(>)
-
- # add a left arrow if event is clipped at the beginning
- if event.start_at.to_date < dates[0]
- cal << %(<div class="ec-left-arrow"></div>)
- end
- # add a right arrow if event is clipped at the end
- if event.end_at.to_date > dates[1]
- cal << %(<div class="ec-right-arrow"></div>)
- end
-
- # add the additional html that was passed as a block to this helper
- cal << block.call(event)
-
- cal << %(</div></td>)
- end
-
- else
- # there wasn't an event, so create an empty cell and container
- cal << %(<td class="ec-event-cell ec-no-event-cell" )
- cal << %(style="padding-top: #{options[:event_margin]}px;">)
- cal << %(<div class="ec-event" )
- cal << %(style="padding-top: #{options[:event_padding_top]}px; )
- cal << %(height: #{options[:event_height] - options[:event_padding_top]}px;" )
- cal << %(>)
- cal << %(&nbsp;</div></td>)
- end
- end
- cal << %(</tr>)
- end
-
- cal << %(</tbody></table>)
- cal << %(</div>)
-
- # increment the calendar row we are on, and the week
- row_num += 1
- first_day_of_week += 7
- last_day_of_week += 7
- end
-
- cal << %(</div>)
- cal << %(</div>)
- cal << %(</div>)
+
+ # default month name for the given number
+ options[:month_name_text] ||= Date::MONTHNAMES[options[:month]]
+
+ render :partial => "/calendar/#{options[:calendar_view]}_view", :locals => {:options => options, :block => block}
end
-
+
# override this in your own helper for greater control
def day_link(text, date, day_action)
link_to(text, params.merge(:action => day_action, :day => date.day), :class => 'ec-day-link')
end
-
+
private
-
+
# calculate the height of each row
# by default, it will be the height option minus the day names height,
# divided by the total number of calendar rows
@@ -275,11 +117,11 @@ def cal_row_heights(options)
end
row_heights
end
-
+
#
# helper methods for working with a calendar week
#
-
+
def days_between(first, second)
if first > second
second + (7 - first)
@@ -287,17 +129,17 @@ def days_between(first, second)
second - first
end
end
-
+
def beginning_of_week(date, start = 0)
days_to_beg = days_between(start, date.wday)
date - days_to_beg
end
-
+
def end_of_week(date, start = 0)
beg = beginning_of_week(date, start)
beg + 6
end
-
+
def weekend?(date)
[0, 6].include?(date.wday)
end

No commit comments for this range

Something went wrong with that request. Please try again.