<%= link_to "Previous", start_date: date_range.first - 1.day %> Week <%= start_date.strftime("%U").to_i %> <%= link_to "Next", start_date: date_range.last + 1.day %> <% date_range.slice(0, 7).each do |day| %> <% end %> <% date_range.each_slice(7) do |week| %> <% week.each do |day| %> <%= content_tag :td, class: calendar.td_classes_for(day) do %> <% block.call day, sorted_events.fetch(day, []) %> <% end %> <% end %> <% end %>
<%= I18n.t("date.abbr_day_names")[day.wday] %>