public override Span GetOffset(Span span, int amount, Pointer.Type pointer) { var direction = (pointer == Pointer.Type.Future) ? 1 : -1; var weekend = new RepeaterWeekend(); weekend.Now = span.Start; var start = weekend .GetNextSpan(pointer) .Start.Value .AddSeconds((amount - 1) * direction * RepeaterWeek.WEEK_SECONDS); return new Span(start, start.AddSeconds(span.Width)); }
public override Span GetOffset(Span span, int amount, Pointer.Type pointer) { var direction = (pointer == Pointer.Type.Future) ? 1 : -1; var weekend = new RepeaterWeekend(); weekend.Now = span.Start; var start = weekend .GetNextSpan(pointer) .Start.Value .AddSeconds((amount - 1) * direction * RepeaterWeek.WEEK_SECONDS); return(new Span(start, start.AddSeconds(span.Width))); }