Ragger.Date
2.4.1-build1
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
This is a prerelease version of Ragger.Date.
dotnet add package Ragger.Date --version 2.4.1-build1
NuGet\Install-Package Ragger.Date -Version 2.4.1-build1
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="Ragger.Date" Version="2.4.1-build1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ragger.Date --version 2.4.1-build1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ragger.Date, 2.4.1-build1"
#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.
// Install Ragger.Date as a Cake Addin #addin nuget:?package=Ragger.Date&version=2.4.1-build1&prerelease // Install Ragger.Date as a Cake Tool #tool nuget:?package=Ragger.Date&version=2.4.1-build1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Nager.Date
Nager.Date is a popular project for querying holidays, we currently support for over 100 countries.
Country Support
The list of supported countries can be found here
Examples
Set License Key
HolidaySystem.LicenseKey = "TheLicenseKey";
Get all holidays of a country and year
var holidays = HolidaySystem.GetHolidays(2024, "DE");
foreach (var holiday in holidays)
{
Console.WriteLine($"{holiday.Date:yyyy-MM-dd} - {holiday.EnglishName}");
//holiday...
//holiday.Date -> The date
//holiday.LocalName -> The local name
//holiday.EnglishName -> The english name
//holiday.NationalHoliday -> Is this holiday in every county (federal state)
//holiday.SubdivisionCodes -> Is the holiday only valid for a special county ISO-3166-2 - Federal states
//holiday.HolidayTypes -> Public, Bank, School, Authorities, Optional, Observance
}
Get all holidays for a date range
var startDate = new DateTime(2016, 5, 1);
var endDate = new DateTime(2024, 5, 31);
var holidays = HolidaySystem.GetHolidays(startDate, endDate, CountryCode.DE);
foreach (var holiday in holidays)
{
//holiday...
}
Check if a date is a public holiday
var date = new DateTime(2024, 1, 1);
if (HolidaySystem.IsPublicHoliday(date, CountryCode.DE))
{
Console.WriteLine("Is a public holiday");
}
Checks if the given date falls on a weekend day
var date = new DateTime(2024, 1, 1);
if (WeekendSystem.IsWeekend(date, CountryCode.DE))
{
Console.WriteLine("The date is in the weekend");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.4.1-build1 | 159 | 7/19/2024 |
A changelog is available at https://github.com/nager/Nager.Date/releases