Trustsoft.HolidaysCalendar
1.0.0-rc3
See the version list below for details.
dotnet add package Trustsoft.HolidaysCalendar --version 1.0.0-rc3
NuGet\Install-Package Trustsoft.HolidaysCalendar -Version 1.0.0-rc3
<PackageReference Include="Trustsoft.HolidaysCalendar" Version="1.0.0-rc3" />
paket add Trustsoft.HolidaysCalendar --version 1.0.0-rc3
#r "nuget: Trustsoft.HolidaysCalendar, 1.0.0-rc3"
// Install Trustsoft.HolidaysCalendar as a Cake Addin #addin nuget:?package=Trustsoft.HolidaysCalendar&version=1.0.0-rc3&prerelease // Install Trustsoft.HolidaysCalendar as a Cake Tool #tool nuget:?package=Trustsoft.HolidaysCalendar&version=1.0.0-rc3&prerelease
Extendable library to work with holidays calendary with ease.
Расширяемая библиотека для работы с (производственным) календарём праздников.<br>
Library for working with the holiday calendar.
Data providers:<br> Out of the box, only Russian holiday calendar at http://xmlcalendar.ru is supported.<br> You can develop your own data provider.
Провайдеры данных:<br> Из коробки поддерживается только календарь праздников России http://xmlcalendar.ru.<br> Вы можете разработать свой провайдер данных.
Usage:
// create primary data provider
IHolidaysDataProvider dataProvider = new XmlCalendarDataProvider();
// create fallback data provider
IFallbackDataProvider fallbackDataProvider = new FallbackDataProvider();
// create holiday calendar with data providers
IHolidaysCalendar calendar = new HolidaysCalendar(dataProvider, fallbackDataProvider);
// day to check
DateOnly date = DateOnly.ParseExact("2024.10.12", "yyyy.MM.dd");
// checking
bool isHoliday = calendar.IsHoliday(date);
bool isWeekend = calendar.IsWeekend(date);
bool IsWorWeek = calendar.IsWorkingWeekend(date);
Contracts:
IHolidaysCalendar - Describes a set of functions for working with holiday calendar.
IHolidaysDataProvider - Describes a holiday data provider.
IFallbackDataProvider - Describes a fallback holiday data provider.
IHolidaysData - Describes a result of fetching data by data provider.
Implementations:
HolidaysCalendar -
IHolidayCalendar
implementation.HolidaysDataFactory - Used to create object that implements
IHolidaysData
.XmlCalendarDataProvider - Russian holidays data provider.
FallbackDataProvider - Russian holidays fallback data provider.
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. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.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.
ChangeLog
---------
1.0.0-rc3 Code refactoring and cleanup.
1.0.0-rc3 Update project metadata.
1.0.0-rc3 Update XML Doc comments.
1.0.0-rc3 Fix codestyle.
1.0.0-rc2 Add more target frameworks support, net6.0-9.0.
1.0.0-rc2 Fix working weekend reading in XmlCalendarDataProvider.
1.0.0-rc2 Improve unit tests.
1.0.0-rc1 First public Nuget package version.