package yangtz.cs.liu.campus.controller;

import com.core.utils.HolidayDateUtil;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import lombok.Data;

@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));
        }
    }
}
