Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.time.LocalDate;
- import java.time.temporal.ChronoUnit;
- import java.util.Objects;
- import java.util.stream.Stream;
- LocalDate startDate = cal.getStartDate();
- LocalDate startExceptionDate = exceptions.get(0).getDate();
- Stream.iterate(startDate, date -> date.plusDays(1))
- .limit(ChronoUnit.DAYS.between(startDate, startExceptionDate))
- .forEach(day -> sb.append("0"));
Add Comment
Please, Sign In to add comment