Skip to content

Instantly share code, notes, and snippets.

@moralez
Created November 13, 2015 16:37
Show Gist options
  • Save moralez/293d3b9c015373cd5fce to your computer and use it in GitHub Desktop.
Save moralez/293d3b9c015373cd5fce to your computer and use it in GitHub Desktop.
Date previousDate = null;
for (LovelyAppointment appointment : appointments) {
if (previousDate == null ||
!DateUtils.isSameDay(previousDate, appointment.getDate()) {
previousDate = appointment.getDate();
appointment.setIsHeader(true);
} else {
appointment.setIsHeader(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment