DateMidnight startOfWeek = currentWeek.weekOfWeekyear().roundFloorCopy();
DateMidnight endOfWeek = startOfWeek.plusWeeks(1);
for (DateMidnight currentDate = startOfWeek; currentDate.isBefore(endOfWeek);
currentDate = currentDate.plusDays(1))
{
Day day = new Day(currentDate.getYear(), currentDate.getMonthOfYear(), currentDate.getDayOfMonth());
week.add(day);
for (Activity activity : activities)
{
Time start = activity.getStart();
if (currentDate.equals(start.toDateMidnight()) && date.getMonthOfYear() == start.getMonth())
{
day.add(activityConverter.toModel(activity));
}
}
}
}
return weeks;