@ Deprecated public Duration getDuration ( String calendarName , Date startDate , Date endDate ) throws MPXJException { ProjectCalendar calendar = getCalendarByName ( calendarName ) ; if ( calendar == null ) { throw new MPXJException ( MPXJException . CALENDAR_ERROR + ": " + calendarName ) ; } return ( calendar . getDuration ( startDate , endDate ) ) ; }
This method is used to calculate the duration of work between two fixed dates according to the work schedule defined in the named calendar . The name of the calendar to be used is passed as an argument .