% if activities.first_page? && activities.first.created_at.to_date == Date.today %>
<%=t "activities.index.today" %>
<% end %>
<% activities.each_with_index do |activity, index| %>
<% prevDate = calculate_previous_date(activities, index, previous_activity_created_at) %>
<% if activity.created_at.to_date < prevDate %>
<%= activity.created_at.strftime('%d.%m.%Y') %>
<% end %>
<%= render 'activities/activity.html.erb', activity: activity %>
<% end %>