Soenneker.Extensions.CultureInfos 11.0.160

Prefix Reserved
dotnet add package Soenneker.Extensions.CultureInfos --version 11.0.160
                    
NuGet\Install-Package Soenneker.Extensions.CultureInfos -Version 11.0.160
                    
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.160" />
                    
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.160" />
                    
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.160
                    
#r "nuget: Soenneker.Extensions.CultureInfos, 11.0.160"
                    
#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.160
                    
#: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.160
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.CultureInfos&version=11.0.160
                    
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.160 674 11/3/2026
11.0.159 381 11/3/2026
11.0.158 420 11/2/2026
11.0.157 1,568 10/26/2026
4.0.156 1,880 10/15/2026
4.0.155 117 10/15/2026
4.0.154 277 10/14/2026
4.0.153 358 10/14/2026
4.0.152 483 10/14/2026
4.0.146 498 10/13/2026
4.0.145 237 10/12/2026
4.0.143 611 10/12/2026
4.0.142 876 10/12/2026
4.0.141 898 10/11/2026
4.0.140 2,155 9/30/2026
4.0.139 1,204 9/25/2026
4.0.138 401 9/25/2026
4.0.137 162 9/24/2026
4.0.136 2,851 9/16/2026
4.0.135 658 9/16/2026
Loading failed

Updated Soenneker.Extensions.String to 11.0.810