Sinistrius.CalendrierRepublicain
0.1.0
See the version list below for details.
dotnet add package Sinistrius.CalendrierRepublicain --version 0.1.0
NuGet\Install-Package Sinistrius.CalendrierRepublicain -Version 0.1.0
<PackageReference Include="Sinistrius.CalendrierRepublicain" Version="0.1.0" />
paket add Sinistrius.CalendrierRepublicain --version 0.1.0
#r "nuget: Sinistrius.CalendrierRepublicain, 0.1.0"
// Install Sinistrius.CalendrierRepublicain as a Cake Addin #addin nuget:?package=Sinistrius.CalendrierRepublicain&version=0.1.0 // Install Sinistrius.CalendrierRepublicain as a Cake Tool #tool nuget:?package=Sinistrius.CalendrierRepublicain&version=0.1.0
Calendrier r�publicain
A .NET library which integrates the French Republican calendar
Installation
Use the NuGet package manager to install the package.
Usage
Restrictions
The calender only handles dates within the its official validity period between 1 Vend�miaire I (i.e. September 22, 1792) and 10 Niv�se XIV (i.e. December 31, 1805).
Creating Dates
Instantiate a DateTime object with Republican date values using the calendar object:
using Sinistrius.CalendrierRepublicain;
FrenchRepublicanCalendar() repCalendar = new();
DateTime date = new(8, 2, 18, repCalendar);
Console.WriteLine(date.ToString("d", DateTimeFormatInfo.InvariantInfo));
// Displays 11/9/1799
Writing Dates
Get a string representation of a Republican date by using the String.Format() method with a format provider and format string. Please note that only a few date and time patterns are supported.
using Sinistrius.CalendrierRepublicain;
FrenchRepublicanDateTimeFormatter provider = new();
DateTime date = new(8, 2, 18, repCalendar);
Console.WriteLine(String.Format(provider, "{0:D}", date));
// Displays Octidi, Brumaire 18, VIII
Console.WriteLine(String.Format(provider, "{0:d MMM. an yyyy}", date));
// Displays 18 Brum. an VIII
Working with the Calendar
The FrenchRepublicanCalendar class provides the same methods as the System.Globalization.Calendar.
using Sinistrius.CalendrierRepublicain;
FrenchRepublicanCalendar calendar = new();
FrenchRepublicanDateTimeFormatter provider = new();
DateTime date = new(8, 2, 18, calendar); // 18 Brumaire VIII
int weeks = 4; // 4 Republican weeks (40 days) to be added
date = calendar.AddWeeks(date, weeks);
Console.WriteLine(String.Format(provider, "{0:d MMMM yyyy}", date));
// Displays 28 Frimaire VIII
License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.
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 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 was computed. 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. |
-
net6.0
- Sinistrius.NumeriRomani (>= 0.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.