calendar.setBase(baseCalendar);
}
//work weeks
WorkWeek week=new WorkWeek();
calendar.setWeek(week);
MpxRangeConverter rangeConverter=new MpxRangeConverter();
for (int i=0; i<7; i++) {
Day mpxDayId=Day.getInstance(i+1);
ProjectCalendarHours mpxDay=mpxCalendar.getCalendarHours(mpxDayId);
net.sf.mpxj.DayType mpxDayType=mpxCalendar.getWorkingDay(mpxDayId);
WorkDay day=null;
if (mpxDay == null) {
if (mpxCalendar.isDerived() &&
mpxBaseCalendar!=null &&
mpxBaseCalendar.isWorkingDay(mpxDayId))
day = WorkDay.getNonWorkingDay();
} else {
day=new WorkDay(DayType.getInstance(mpxDayType.getValue()));
rangeConverter.from(mpxDay,day);
}
week.setDay(i,day);
}
//exceptions
MpxExceptionConverter exceptionConverter=new MpxExceptionConverter();
for (ProjectCalendarException mpxException : mpxCalendar.getCalendarExceptions()){