<%= link_to "Previous", url_for(params.merge(start_date: date_range.first - 1.day)) %> <%= I18n.t("date.month_names")[start_date.month] %> <%= start_date.year %> <%= link_to "Next", url_for(params.merge(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 %> <% if defined?(Haml) && respond_to?(:block_is_haml?) && block_is_haml?(block) %> <% capture_haml do %> <% block.call day, sorted_events.fetch(day, []) %> <% end %> <% else %> <% block.call day, sorted_events.fetch(day, []) %> <% end %> <% end %> <% end %> <% end %>
<%= I18n.t("date.abbr_day_names")[day.wday] %>