WorkCalendar cal = getEffectiveWorkCalendar();
boolean firstBar = (cal.compare(getStart(),start,false) == 0);
long startOffset = cal.compare(start,getStart(),false);
long endOffset = cal.compare(end,getStart(),false);
Interval range = getRangeThatIntervalCanBeMoved(start,startOffset,startOffset);
if (extendDuration > 0)
extendDuration = Math.min(extendDuration,endOffset - startOffset);
else
extendDuration = Math.max(extendDuration,range.getStart() - startOffset); // don't allow to shift more than possible
if (firstBar)
setTotalDelay(calcTotalDelay() + extendDuration);
newDetail().extendBefore(startOffset,extendDuration);