%
current_day = DateTime.current.strftime('%j').to_i
%>
<% if !hide_today and activities.count > 0 and activities[0].created_at.strftime('%j').to_i == current_day %>
<%=t "activities.index.today" %>
<% end %>
<% activities.each do |activity| %>
<% activity_day = activity.created_at.strftime('%j').to_i %>
<% if activity_day < current_day and activity_day < day %>
<% day = activity.created_at.strftime('%j').to_i %>
<%= activity.created_at.strftime('%d.%m.%Y') %>
<% end %>
<%= render 'activities/activity.html.erb', activity: activity %>
<% end %>