Guest User

Untitled

a guest
Jun 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import java.time.LocalDate;
  2. import java.time.temporal.ChronoUnit;
  3. import java.util.Objects;
  4. import java.util.stream.Stream;
  5.  
  6. LocalDate startDate = cal.getStartDate();
  7. LocalDate startExceptionDate = exceptions.get(0).getDate();
  8.  
  9. Stream.iterate(startDate, date -> date.plusDays(1))
  10. .limit(ChronoUnit.DAYS.between(startDate, startExceptionDate))
  11. .forEach(day -> sb.append("0"));
Add Comment
Please, Sign In to add comment