/// <summary> /// Adds or subtracts the given calendar date and returns one or more new calendar entities representing the same data. /// </summary> /// <returns></returns> public static IEnumerable <Calendar> AddOrSubtract(this Calendar calendar, CalendarDate calendarDate) { if (calendarDate.ExceptionType == Enumerations.ExceptionType.Added) { return(calendar.Add(calendarDate.Date)); } return(calendar.Subtract(calendarDate.Date)); }
/// <summary> /// Adds or subtracts the given calendar date and returns one or more new calendar entities representing the same data. /// </summary> /// <returns></returns> public static IEnumerable<Calendar> AddOrSubtract(this Calendar calendar, CalendarDate calendarDate) { if(calendarDate.ExceptionType == Enumerations.ExceptionType.Added) { return calendar.Add(calendarDate.Date); } return calendar.Subtract(calendarDate.Date); }