pointer = PointerType.FUTURE;
}
MutableInterval MutableInterval;
if (pointer == PointerType.FUTURE) {
DateTime thisFortnightStart = Time.cloneAndAdd(Time.ymdh(getNow()), Time.SECOND, RepeaterHour.HOUR_SECONDS);
RepeaterDayName sundayRepeater = new RepeaterDayName(RepeaterDayName.DayName.SUNDAY);
sundayRepeater.setStart(getNow());
sundayRepeater.thisMutableInterval(PointerType.FUTURE);
MutableInterval thisSundayMutableInterval = sundayRepeater.thisMutableInterval(PointerType.FUTURE);
DateTime thisFortnightEnd = thisSundayMutableInterval.getStart();
MutableInterval = new MutableInterval(thisFortnightStart, thisFortnightEnd);
}
else if (pointer == PointerType.PAST) {
DateTime thisFortnightEnd = Time.ymdh(getNow());
RepeaterDayName sundayRepeater = new RepeaterDayName(RepeaterDayName.DayName.SUNDAY);
sundayRepeater.setStart(getNow());
MutableInterval lastSundayMutableInterval = sundayRepeater.nextMutableInterval(PointerType.PAST);
DateTime thisFortnightStart = lastSundayMutableInterval.getStart();
MutableInterval = new MutableInterval(thisFortnightStart, thisFortnightEnd);
}
else {
throw new IllegalArgumentException("Unable to handle pointer " + pointer + ".");
}