package yangtz.cs.liu.campus.controller;

import com.core.utils.HolidayDateUtil;
import com.core.utils.StringUtil;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import lombok.Data;
import sun.security.provider.Sun;
import yangtz.cs.liu.campus.domain.student.SchoolStudent;
import yangtz.cs.liu.campus.vo.student.StudentLeaveVO;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Data
public class A {
    public static void main(String[] args) throws ParseException {
      Date startDate = HolidayDateUtil.format1.parse("2023-03-01");
      Date endDate = HolidayDateUtil.format1.parse("2023-03-31");
      List<Date> list = new ArrayList<>();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(startDate);
        while(calendar.getTime().before(endDate)){
            list.add(calendar.getTime());
            calendar.add(Calendar.DAY_OF_MONTH, 1);
        }
        list.add(endDate);
        for(Date d : list){
            System.out.println(HolidayDateUtil.format1.format(d));
        }
    }
}
