I am trying to calculate the number of days between two given dates using processing 3. But I am facing a problem with the date library.
import java.text.SimpleDateFormat;
import java.util.Date;
import java.time.LocalDate;
import java.time.Month;
import java.time.temporal.ChronoUnit;
Date epoDate = new Date();
Date epo = new Date();
try {
epoDate = new SimpleDateFormat("yyyy-mm-dd").parse("2015-01-03");
epo = new SimpleDateFormat("yyyy-mm-dd").parse("2015-04-23");
}
catch (Exception e) {
}
ChronoUnit.DAYS.between(epo,epoDate);
}
the problem is with the last line the between function where it says it requires 2 temporal as inputs?