int startDayOfWeek = c.get(Calendar.DAY_OF_WEEK);
c.setTime(endDate);
int endDayOfWeek = c.get(Calendar.DAY_OF_WEEK);
TaskLength duration = myTaskManager.createLength(timeUnit,
startDate, endDate);
DayType dayType = getTaskManager().getCalendar()
.getWeekDayType(startDayOfWeek);
dayType = getTaskManager().getCalendar().getDayTypeDate(
startDate);
return new DayTypeAlternance(dayType, duration, endDate);
}
void createAlternance(TimeUnit timeUnit, TimeFrame timeFrame, List output) {
DayType startType = null;
Date startDate = null;
int unitCount = timeFrame.getUnitCount(timeUnit);
for (int i=0; i<unitCount; i++) {
Date start = timeFrame.getUnitStart(timeUnit, i);
c.setTime(start);
int startDayOfWeek = c.get(Calendar.DAY_OF_WEEK);
DayType dayType = getTaskManager().getCalendar().getWeekDayType(startDayOfWeek);
if (startType==null) {
startType = dayType;
startDate = start;
}
if (startType!=dayType) {