week.setName(xmlWeek.getName());
Date startTime = DatatypeConverter.parseDate(xmlWeek.getTimePeriod().getFromDate());
Date endTime = DatatypeConverter.parseDate(xmlWeek.getTimePeriod().getToDate());
week.setDateRange(new DateRange(startTime, endTime));
WeekDays xmlWeekDays = xmlWeek.getWeekDays();
if (xmlWeekDays != null)
{
for (WeekDay xmlWeekDay : xmlWeekDays.getWeekDay())
{
int dayNumber = xmlWeekDay.getDayType().intValue();
Day day = Day.getInstance(dayNumber);
week.setWorkingDay(day, BooleanUtility.getBoolean(xmlWeekDay.isDayWorking()));
ProjectCalendarHours hours = week.addCalendarHours(day);