public int calcWeekdays(DtpDate date)
An int representing the number of weekdays. This is always a positive number.
DtpDateException
The calcWeekdays() method calculates the number of weekdays between this date and another date. The difference between Friday and Saturday is 0, and between Friday and Monday is 1. Weekdays are assumed to be Monday through Friday or the equivalent values. A weekday is not the same as a business day, since a holiday can fall on a weekday.
try { DtpDate toDay = new DtpDate(); DtpDate tomorrow = toDay.addDays(1); int days = today.caldWeekdays(tomorrow); } catch ( DtpDateException date_e ) { System.out.println(date_e.getMessage()); }