public int calcDays(DtpDate date)
An int representing the number of days. This is always a positive number.
DtpDateException
The calcDays() method calculates the difference in the number of days between this date and another date. The result is always a whole number of days.
The difference between 19990615 00:30:59 and 19990615 23:59:59 is 0 days, and the difference between 19990615 23:59:59 and 19990616 00:01:01 is 1 day.
try { DtpDate toDay = new DtpDate(); DtpDate tomorrow = toDay.addDays(1); int days = today.caldDays(tomorrow); } catch ( DtpDateException date_e ) { System.out.println(date_e.getMessage()); }