Bsft.Calendar 2.2.0

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

Bsft.Calendar

The business-day arithmetic the framework's delays are computed with: a keyed registry of calendars and the provider that resolves one, so "in two days" can mean 48 hours in one branch of a company and the next working day in another.

Install

dotnet add package Bsft.Calendar

No further Bsft packages; it depends on Microsoft.Extensions.Options, the DI abstractions and Microsoft.Extensions.Hosting.Abstractions, which is where the ValidateOnStart() the registration call makes comes from. It is pulled in by Bsft.EventAggregator.Saga, which schedules saga timeouts through it, and by Bsft.Workflow, which dates a step's deadline with it.

Register

services.AddBsftCalendar(options =>
{
    options.AddCalendar("berlin", new WeekdayBusinessCalendar(
        nonWorkingDays: null,
        timeZone: TimeZoneInfo.FindSystemTimeZoneById("Europe/Berlin")));
    options.Default = ContinuousBusinessCalendar.Instance;
});

Nothing else is required. Repeated calls are additive: each one contributes another configuration step to the same options instance, so a package registering its defaults never discards the calendars the application registers afterwards, whichever order they run in. There is no IConfiguration overload — see below.

Configure

BsftCalendarOptions has no SectionName and the entry point has no IConfiguration overload. Every member of it is an IBusinessCalendar implementation chosen in code, and a configuration provider has nothing to bind to one. A host that drives its calendars from configuration reads its own section and calls AddCalendar with the instances it built.

Option Default Effect
BsftCalendarOptions.Default ContinuousBusinessCalendar.Instance The calendar used when a caller passes no key; every day is a working day.
BsftCalendarOptions.Calendars empty The keyed registry, contributed to through AddCalendar(key, calendar).

Validation: a default calendar must be present. A failure names the member, and it is reported on start.

Extend

IBusinessCalendar (decides whether a moment is working time and advances a delay across non-working time; ContinuousBusinessCalendar and WeekdayBusinessCalendar are the two shipped, and a host implements it for public holidays, shift patterns or site-specific rules). IBusinessCalendarProvider (resolves a key to a calendar) is registered with TryAdd, so a host that registered its own resolution strategy keeps it. Public holidays are deliberately not in the framework: they differ per country, per federal state and often per site.

Documentation

Topic page: docs/calendar.md. Conventions: docs/package-conventions.md.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 (1)

Showing the top 1 NuGet packages that depend on Bsft.Calendar:

Package Downloads
Bsft.EventAggregator.Saga

BSFT Framework saga/flow engine on top of IEventAggregator

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 131 10/23/2026
2.1.0 172 9/28/2026