DateRecurrenceR 1.2.0
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DateRecurrenceR --version 1.2.0
NuGet\Install-Package DateRecurrenceR -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DateRecurrenceR" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DateRecurrenceR" Version="1.2.0" />
<PackageReference Include="DateRecurrenceR" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DateRecurrenceR --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DateRecurrenceR, 1.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DateRecurrenceR@1.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DateRecurrenceR&version=1.2.0
#tool nuget:?package=DateRecurrenceR&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DateRecurrenceR
No AI, just math.
Efficient Date Recurrence Library for .NET
DateRecurrenceR is a .NET library designed to handle and manage recurrence date patterns efficiently.
Key Features
- Dynamic Subrange Generation: Generate only the needed dates within a specified range, optimizing performance and memory usage.
- Time Localization Simplification: Uses DateOnly, eliminating issues related to time localization.
- Flexible Collection Handling: Returns an enumerator, allowing developers to choose the collection type.
- Optimal Performance: Boasts a Big O notation of O(1), ensuring efficient operations.
Methods for Recurrences
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>
.
All parameters
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. |
Subranges
All methods for recurrences support the following subrange rules:
By dates
- Parameters:
fromDate
andtoDate
- Rule: Takes dates from the intersection
[beginDate, endDate] ∪ [fromDate, toDate]
By count
- Parameters:
fromDate
andcount
- Rule: Takes dates from the intersection
[beginDate, endDate] ∪ [fromDate, DateOnly.MaxValue]
and takes the firstcount
dates
Examples of Use
var enumerator = Recurrence.Daily(beginDate, endDate, fromDate, toDate, interval); // IEnumerator<DateOnly>
Installing DateRecurrenceR
You can install DateRecurrenceR via NuGet:
Package Manager Console:
Install-Package DateRecurrenceR
.NET Core CLI:
dotnet add package DateRecurrenceR
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DateRecurrenceR:
Package | Downloads |
---|---|
DateRecurrenceR.Objects
Library for represents a recurrence pattern of date. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.3.0-alpha-1 | 78 | 5/24/2025 |
1.2.0 | 284 | 12/26/2024 |