Soenneker.Extensions.CultureInfos 11.0.166

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.CultureInfos

Classifies a CultureInfo into a Friday–Saturday or Saturday–Sunday weekend pattern and checks days against that pattern.

Installation

dotnet add package Soenneker.Extensions.CultureInfos

Usage

using System.Globalization;
using Soenneker.Extensions.CultureInfos;

CultureInfo culture = CultureInfo.GetCultureInfo("ar-SA");

bool usesFridaySaturday = culture.UsesFriSatWeekend();
bool fridayIsWeekend = culture.IsWeekendDay(DayOfWeek.Friday);
IReadOnlySet<DayOfWeek> weekend = culture.GetWeekendDays();

GetWeekendDays() returns a shared immutable set. It is safe to cache and cannot be cast back to a mutable HashSet to alter results globally.

Classification rules

The Friday–Saturday pattern is selected for:

  • Culture names beginning with ar-
  • he-IL
  • fa-IR
  • ur-PK

Every other culture uses Saturday–Sunday. Matching is case-insensitive.

These are fixed package rules, not data from an official holiday calendar. They do not account for public holidays, historical changes, employer-specific schedules, or regional exceptions within the same language. For payroll, settlement, compliance, or other date-sensitive business rules, use a maintained calendar source for the relevant jurisdiction.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Soenneker.Extensions.CultureInfos:

Package Downloads
Soenneker.Extensions.DateTime

A collection of helpful DateTime extension methods

Soenneker.Extensions.DateTimeOffsets

A collection of helpful DateTimeOffset extension methods

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.166 408 11/11/2026
11.0.165 190 11/11/2026
11.0.164 411 11/11/2026
11.0.163 308 11/11/2026
11.0.162 511 11/11/2026
11.0.161 77 11/10/2026
11.0.160 1,566 11/3/2026
11.0.159 408 11/3/2026
11.0.158 431 11/2/2026
11.0.157 1,572 10/26/2026
4.0.156 1,901 10/15/2026
4.0.155 120 10/15/2026
4.0.154 278 10/14/2026
4.0.153 359 10/14/2026
4.0.152 485 10/14/2026
4.0.146 501 10/13/2026
4.0.145 238 10/12/2026
4.0.143 612 10/12/2026
4.0.142 877 10/12/2026
4.0.141 899 10/11/2026
Loading failed

Updated Multiple NuGet packages