Class RecurrenceHelper
Represents a helper for handling recurrence appointments.
Inheritance
System.Object
RecurrenceHelper
Namespace: Syncfusion.Blazor.Schedule
Assembly: Syncfusion.Blazor.dll
Syntax
public static class RecurrenceHelper : Object
Methods
GetRecurrenceDateTimeCollection(String, String, Int32, DateTime, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>, Nullable<Int32>)
Method to get recurrence appointment's date-time collection.
Declaration
public static ObservableCollection<DateTime> GetRecurrenceDateTimeCollection(string recurrenceRule, string excludedDates, int firstDayOfWeek, DateTime recurrenceStartDate, Nullable<DateTime> recurrenceEndDate, Nullable<DateTime> dateRangeStart, Nullable<DateTime> dateRangeEnd, Nullable<int> maximumCount)
Parameters
Type | Name | Description |
---|---|---|
System.String | recurrenceRule | RRule of Recurrence appointment's. |
System.String | excludedDates | Dates exclude from collection |
System.Int32 | firstDayOfWeek | First day of week |
System.DateTime | recurrenceStartDate | Recurrence start date. |
System.Nullable<System.DateTime> | recurrenceEndDate | Recurrence end date. |
System.Nullable<System.DateTime> | dateRangeStart | Start date to collect the recurrence dates from the specified date range. |
System.Nullable<System.DateTime> | dateRangeEnd | End date to collect the recurrence dates from the specified date range. |
System.Nullable<System.Int32> | maximumCount | Length of the recurrence DateTime collection. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<System.DateTime> | Collection of recurrence date time |
Examples
List<DateTime> dateList = new List<DateTime>();
void GetDates()
{
dateList = RecurrenceHelper.GetRecurrenceDateTimeCollection("FREQ=WEEKLY;BYDAY=TU;INTERVAL=1;", "20221220T090000Z", 0, new DateTime(2022, 11, 9), new DateTime(2023, 1, 31), new DateTime(2022, 11, 9), new DateTime(2023, 1, 31), 9).ToList();
}
GetRuleSummary(String, ISyncfusionStringLocalizer)
Method to get the rule summary.
Declaration
public static string GetRuleSummary(string recurrenceRule, ISyncfusionStringLocalizer localizer)
Parameters
Type | Name | Description |
---|---|---|
System.String | recurrenceRule | Recurrence rule. |
ISyncfusionStringLocalizer | localizer | Syncfusion Localizer. |
Returns
Type | Description |
---|---|
System.String | Recurrence rule summary |
Examples
@inject ISyncfusionStringLocalizer Localizer
string ruleSummary;
void RuleSummary()
{
ruleSummary = RecurrenceHelper.GetRuleSummary("FREQ=WEEKLY;BYDAY=TU;INTERVAL=1;", Localizer);
}
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Recurrence rule or localizer is null |