No AI, just math.
DateRecurrenceR is a .NET library designed to handle and manage recurrence date patterns efficiently.
method | description |
---|---|
Daily | Gets a daily recurrence by interval |
Weekly | Gets a weekly recurrence by days of week and interval |
Monthly | Gets a monthly recurrence by days of week or day of month and interval |
Yearly | Gets an yearly recurrence by days of week or day of month or day of year and interval |
All these methods return an instance of IEnumerator<DateOnly>
.
parameter | description |
---|---|
beginDate | The date when the recurrence begins. |
endDate | The date when the recurrence ends. |
interval | The interval between occurrences. |
fromDate | The date when a specific range starts. |
toDate | The date when a specific range finishes. |
count | The maximum number of contiguous dates. |
dayOfWeek | The day of the week. |
dayOfMonth | The day of the month. Takes the last day of the month if dayOfMonth is more than the days in the month. |
dayOfYear | The day of the year. |
weekDays | Days of the week. |
indexOfDay | Index of dayOfWeek in the month. |
numberOfMonth | The number of the month. |
firstDayOfWeek | The first day of the week. |
All methods for recurrences support the following subrange rules:
fromDate
and toDate
[beginDate, endDate] ∪ [fromDate, toDate]
fromDate
and count
[beginDate, endDate] ∪ [fromDate, DateOnly.MaxValue]
and takes the
first count
datesvar enumerator = Recurrence.Daily(beginDate, endDate, fromDate, toDate, interval); // IEnumerator<DateOnly>
You can install DateRecurrenceR via NuGet:
Package Manager Console:
Install-Package DateRecurrenceR
.NET Core CLI:
dotnet add package DateRecurrenceR