/// <summary> /// Adds the period to an array of dates. /// </summary> /// <param name="baseDate">The base dates.</param> /// <param name="dayType">The day type.</param> /// <param name="periodArray">The period interval array.</param> /// <param name="businessDayConvention">The business day convention.</param> /// <param name="location">The calendar. </param> /// <returns>A range of dates.</returns> public object[,] AddManyPeriods(DateTime baseDate, string dayType, Excel.Range periodArray, string businessDayConvention, string location) { List <string> periodVals = DataRangeHelper.StripRange(periodArray); List <DateTime> periods = CalendarService.AddPeriods(baseDate, dayType, periodVals.ToArray(), businessDayConvention, new[] { location }); var resVals = RangeHelper.ConvertArrayToRange(periods); return(resVals); }
/// <summary> /// Adds the period to an array of dates. /// </summary> /// <param name="dateArray">The dates as an array.</param> /// <param name="dayType">The day type.</param> /// <param name="periodInterval">The period interval.</param> /// <param name="businessDayConvention">The business day convention.</param> /// <param name="location">The calendar. </param> /// <returns>A range of dates.</returns> public object[,] AddPeriods1(Excel.Range dateArray, string dayType, string periodInterval, string businessDayConvention, string location) { List <DateTime> dateVals = DataRangeHelper.StripDateTimeRange(dateArray); List <DateTime> periods = CalendarService.AddPeriods(dateVals.ToArray(), dayType, periodInterval, businessDayConvention, new[] { location }); var resVals = RangeHelper.ConvertArrayToRange(periods); return(resVals); }