java 날짜계산
출처: https://sowon-dev.github.io/2021/07/14/210715Calendar/
private String[][] setDateAtColumns(String[][] columnsWeek, String strFromDate) {
SimpleDateFormat formatYMD = new SimpleDateFormat("yyyy-MM-dd");
try {
Date fromDate = formatYMD.parse(strFromDate);
Calendar cal = Calendar.getInstance();
cal.setTime(fromDate);
for(int i=2; i<16; i++) {
columnsWeek[i][0] = formatYMD.format(cal.getTime()) + columnsWeek[i][0];
i++;
columnsWeek[i][0] = formatYMD.format(cal.getTime()) + columnsWeek[i][0];
cal.add(Calendar.DATE, 1);
}
} catch (Exception e) {
throw new GlobalException("엑셀 날짜계산 오류", true);
}
return columnsWeek;
}