public static RecurrenceValues GetPostRecurrenceValues(string seriesInfo, int modifiedOccurrencesValue) { RecurrenceSettings settings = null; RecurrenceValues tempValues; DateTime lastDate; switch (seriesInfo[0]) { case 'Y': // Yearly settings = YearlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; case 'M': // Monthly settings = MonthlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; case 'W': // Weekly settings = WeeklyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; case 'D': // Daily settings = DailyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; } // get the RecurrenceValues tempValues = settings.GetValues(); // Add one day to the last date so it now becomes the Start date past the last // date in the series lastDate = tempValues.LastDate.AddDays(1); return(settings.GetValues(lastDate, modifiedOccurrencesValue)); }
/// <summary> /// Get a collection of recurrence values that are AFTER the values as defined by the /// Series Info value. The endDate param. defines how far past the existing end date /// as defined by the Series Info. /// </summary> /// <param name="seriesInfo" type="string"> /// <para> /// The recurrence pattern series information. /// </para> /// </param> /// <param name="endDate" type="System.DateTime"> /// <para> /// DateTime of the end date that is past the end date in the Series Info where /// you want the collection of values to end. /// </para> /// </param> /// <returns> /// A RecurrenceGenerator.RecurrenceValues value... /// </returns> public static RecurrenceValues GetPostRecurrenceValues(string seriesInfo, DateTime endDate) { RecurrenceSettings settings = null; RecurrenceValues tempValues; DateTime lastDate; switch (seriesInfo.Substring(0, 1)) { case "Y": // Yearly settings = YearlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; case "M": // Monthly settings = MonthlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; case "W": // Weekly settings = WeeklyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; case "D": // Daily settings = DailyRecurrenceSettings.GetRecurrenceSettings(seriesInfo); break; } // get the RecurrenceValues tempValues = settings.GetValues(); // Add one day to the last date so it now becomes the Start date past the last // date in the series lastDate = tempValues.LastDate.AddDays(1); return(settings.GetValues(lastDate, endDate)); }
public static RecurrenceValues GetRecurrenceValues(string seriesInfo, DateTime modifiedStartDateValue, DateTime modifiedEndDateValue) { RecurrenceSettings settings = null; switch (seriesInfo[0]) { case 'Y': // Yearly settings = YearlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedStartDateValue, modifiedEndDateValue); break; case 'M': // Monthly settings = MonthlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedStartDateValue, modifiedEndDateValue); break; case 'W': // Weekly settings = WeeklyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedStartDateValue, modifiedEndDateValue); break; case 'D': // Daily settings = DailyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedStartDateValue, modifiedEndDateValue); break; } // Return the RecurrenceValues return(settings.GetValues()); }
/// <summary> /// Get a modified collection of recurrence values from an existing Series Info value and modified /// End Date value. /// </summary> /// <param name="seriesInfo" type="string"> /// <para> /// The recurrence pattern series information. /// </para> /// </param> /// <param name="modifiedEndDateValue" type="System.DateTime"> /// <para> /// DateTime of the modified end date that you want the recurrence values to continue until. /// </para> /// </param> /// <returns> /// A RecurrenceGenerator.RecurrenceValues value... /// </returns> public static RecurrenceValues GetRecurrenceValues(string seriesInfo, DateTime modifiedEndDateValue) { RecurrenceSettings settings = null; switch (seriesInfo.Substring(0, 1)) { case "Y": // Yearly settings = YearlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedEndDateValue); break; case "M": // Monthly settings = MonthlyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedEndDateValue); break; case "W": // Weekly settings = WeeklyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedEndDateValue); break; case "D": // Daily settings = DailyRecurrenceSettings.GetRecurrenceSettings(seriesInfo, modifiedEndDateValue); break; } // Return the RecurrenceValues return(settings.GetValues()); }