package com.madeu.batch;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class test {

	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		String dateParam1 = "2024-01-30";
		String dateParam2 = "2024-02-01";
		
		Date format1 = new SimpleDateFormat("yyyy-MM-dd").parse(dateParam1);
		Date format2 = new SimpleDateFormat("yyyy-MM-dd").parse(dateParam2);
		
		long diffSec = (format2.getTime() - format1.getTime()) / 1000; //초 차이
		long diffDays = diffSec / (24*60*60); //일자수 차이
		
		System.out.println(diffDays+1);
	}

}
