馬老師CKA認(rèn)證
2022-11-20 10:31 作者:666好聽(tīng)的名字 | 我要投稿
static List<LocalDateTime> listBetweenDate(LocalDateTime startDay, LocalDateTime endDay) {
? ? ? ?List<LocalDateTime> list = new ArrayList<>();
? ? ? ?long distance = ChronoUnit.DAYS.between(startDay, endDay);
? ? ? ?Stream.iterate(startDay, d -> d.plusDays(1)).limit(distance + 1).forEach(f -> list.add(f));
? ? ? ?return list;
標(biāo)簽: