package com.njcn.oracle.util;

import java.time.LocalDate;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;

/**
 * Description:
 * Date: 2024/1/8  16:28【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
public class LocalDateUtil {
    public static List<LocalDate> getDateList(LocalDate startDate, LocalDate endDate) {
        List<LocalDate> dateList = new ArrayList<>();
        long daysBetween = ChronoUnit.DAYS.between(startDate, endDate);

        for (long i = 0; i <= daysBetween; i++) {
            dateList.add(startDate.plusDays(i));
        }
        return dateList;
    }


}
