LiturgyCoreEngine 1.0.0-alpha1
dotnet add package LiturgyCoreEngine --version 1.0.0-alpha1
NuGet\Install-Package LiturgyCoreEngine -Version 1.0.0-alpha1
<PackageReference Include="LiturgyCoreEngine" Version="1.0.0-alpha1" />
<PackageVersion Include="LiturgyCoreEngine" Version="1.0.0-alpha1" />
<PackageReference Include="LiturgyCoreEngine" />
paket add LiturgyCoreEngine --version 1.0.0-alpha1
#r "nuget: LiturgyCoreEngine, 1.0.0-alpha1"
#:package LiturgyCoreEngine@1.0.0-alpha1
#addin nuget:?package=LiturgyCoreEngine&version=1.0.0-alpha1&prerelease
#tool nuget:?package=LiturgyCoreEngine&version=1.0.0-alpha1&prerelease
<div align="center">
LiturgyCoreEngine
A modern .NET 10 Liturgical Calendar Engine (Roman Rite)
⭐ If you like this project, star it on GitHub!
Overview • Features • Installation • Usage
</div>
Overview
LiturgyCoreEngine is a robust and modern C# .NET library designed to calculate the General Roman Calendar and the Liturgy of the Hours. Ported from the popular Romcal JavaScript library, it brings comprehensive liturgical calculations to the .NET ecosystem, fully leveraging .NET 10 and C# 14 features such as dependency injection and the options pattern.
Features
- 📅 Liturgical Calendar Calculation - Generate full liturgical years with precedence sorting, seasonal data, and color assignments.
- ⛪ Liturgy of the Hours - Resolve the appropriate liturgical day and calculate hour structures (e.g., Lauds, Vespers, Compline) for any given date.
- 🌍 Localization Support - Built-in multi-language support powered by flexible JSON resource files.
- ⚙️ Highly Configurable - Support for different calendar scopes (Gregorian) and Easter calculation methods.
- 🚀 Modern .NET - Built for .NET 10, utilizing
Microsoft.Extensions.DependencyInjectionandMicrosoft.Extensions.Options.
Installation
You can install the package via the NuGet Package Manager or the .NET CLI:
dotnet add package LiturgyCoreEngine --version 1.0.0-alpha1
Usage
The engine is designed to be easily integrated into any modern .NET application via Dependency Injection.
Setting up Dependency Injection
Register the Liturgy Core Engine services in your application's startup or program file:
using Microsoft.Extensions.DependencyInjection;
using LiturgyCoreEngine.Calendar.Models;
var services = new ServiceCollection();
services.AddLiturgyCore(options =>
{
options.Scope = CalendarScope.Gregorian;
options.EasterCalculationType = EasterCalculationType.Gregorian;
});
var serviceProvider = services.BuildServiceProvider();
Generating the Liturgical Calendar
Once registered, you can inject LiturgicalCalendar to generate the calendar for a specific year:
using LiturgyCoreEngine.Calendar;
var engine = serviceProvider.GetRequiredService<LiturgicalCalendar>();
// Generate the liturgical calendar for the year 2024
var calendar2024 = engine.GetYear(2024);
// Retrieve the liturgical day data for a specific date
var easterDate = new DateOnly(2024, 3, 31);
var easterDays = calendar2024[easterDate];
foreach (var day in easterDays)
{
Console.WriteLine($"Name: {day.Id}, Rank: {day.RankName}, Obligation: {day.IsHolyDayOfObligation}");
}
Calculating Liturgy of the Hours
Inject the ILiturgyHoursCalculator to compute the Liturgy of the Hours for any day:
using LiturgyCoreEngine.Hours;
var hoursCalculator = serviceProvider.GetRequiredService<ILiturgyHoursCalculator>();
// Calculate all hours for the day
var dailyHours = hoursCalculator.CalculateDay(easterDate, "easter_sunday", calendar2024);
Console.WriteLine($"Vespers Psalter Week: {dailyHours.Vespers.PsalterWeek}");
When generating calendars, precedence rules from the Universal Norms on the Liturgical Year (UNLY) are automatically applied to sort overlapping observances on the same day.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.9)
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 |
|---|---|---|
| 1.0.0-alpha1 | 71 | 7/13/2026 |