LiturgyCoreEngine 1.0.0-alpha1

This is a prerelease version of LiturgyCoreEngine.
dotnet add package LiturgyCoreEngine --version 1.0.0-alpha1
                    
NuGet\Install-Package LiturgyCoreEngine -Version 1.0.0-alpha1
                    
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="LiturgyCoreEngine" Version="1.0.0-alpha1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiturgyCoreEngine" Version="1.0.0-alpha1" />
                    
Directory.Packages.props
<PackageReference Include="LiturgyCoreEngine" />
                    
Project file
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 LiturgyCoreEngine --version 1.0.0-alpha1
                    
#r "nuget: LiturgyCoreEngine, 1.0.0-alpha1"
                    
#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 LiturgyCoreEngine@1.0.0-alpha1
                    
#: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=LiturgyCoreEngine&version=1.0.0-alpha1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=LiturgyCoreEngine&version=1.0.0-alpha1&prerelease
                    
Install as a Cake Tool

<div align="center">

LiturgyCoreEngine

A modern .NET 10 Liturgical Calendar Engine (Roman Rite)

Build Status NuGet version .NET License

⭐ If you like this project, star it on GitHub!

OverviewFeaturesInstallationUsage

</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.DependencyInjection and Microsoft.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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