/// <summary> /// Moves the period backwards in time according to the type set. If Type == PeriodType.Year, the start and end is moved -1 year. /// </summary> public void Subtract() { switch (Type) { case PeriodType.Year: Start = Start.AddYears(-1); End = End.AddYears(-1); break; case PeriodType.Halfyear: Start = Start.AddMonths(-6); End = End.AddMonths(-6); break; case PeriodType.Month: Start = Start.AddMonths(-1); End = End.AddMonths(-1); break; default: break; } }
public void YearForward() { Start = Start.AddYears(1); Finish = Finish.AddYears(1); }
public void YearBack() { Start = Start.AddYears(-1); Finish = Finish.AddYears(-1); }
public DateTimeRange SpreadByYears(int yearsStart, int yearsEnd) { return(new DateTimeRange( start: Start.AddYears(-yearsStart), end: End.AddYears(yearsEnd))); }