% if activities.first.created_at.to_date == Date.today %>
<%=t "activities.index.today" %>
<% end %>
<% activities.each_with_index do |activity, index| %>
<% prevDate = activities[index - 1] ? activities[index - 1].created_at.to_date : Date.new(1901, 1, 1) %>
<% if activity.created_at.to_date < prevDate %>
<%= activity.created_at.strftime('%d.%m.%Y') %>
<% end %>
<%= render 'activities/activity.html.erb', activity: activity %>
<% end %>