Soenneker.Extensions.CultureInfos
4.0.120
Prefix Reserved
dotnet add package Soenneker.Extensions.CultureInfos --version 4.0.120
NuGet\Install-Package Soenneker.Extensions.CultureInfos -Version 4.0.120
<PackageReference Include="Soenneker.Extensions.CultureInfos" Version="4.0.120" />
<PackageVersion Include="Soenneker.Extensions.CultureInfos" Version="4.0.120" />
<PackageReference Include="Soenneker.Extensions.CultureInfos" />
paket add Soenneker.Extensions.CultureInfos --version 4.0.120
#r "nuget: Soenneker.Extensions.CultureInfos, 4.0.120"
#:package Soenneker.Extensions.CultureInfos@4.0.120
#addin nuget:?package=Soenneker.Extensions.CultureInfos&version=4.0.120
#tool nuget:?package=Soenneker.Extensions.CultureInfos&version=4.0.120
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-ILfa-IRur-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 | 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
- Soenneker.Extensions.String (>= 4.0.736)
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 |
|---|---|---|
| 4.0.120 | 1,786 | 8/31/2026 |
| 4.0.119 | 836 | 8/31/2026 |
| 4.0.118 | 700 | 8/31/2026 |
| 4.0.117 | 317 | 8/31/2026 |
| 4.0.116 | 82 | 8/30/2026 |
| 4.0.115 | 958 | 8/30/2026 |
| 4.0.114 | 429 | 8/29/2026 |
| 4.0.113 | 83 | 8/29/2026 |
| 4.0.112 | 2,039 | 8/26/2026 |
| 4.0.111 | 425 | 8/25/2026 |
| 4.0.110 | 833 | 8/21/2026 |
| 4.0.109 | 1,593 | 8/18/2026 |
| 4.0.108 | 88 | 8/18/2026 |
| 4.0.107 | 1,672 | 8/12/2026 |
| 4.0.106 | 1,248 | 8/8/2026 |
| 4.0.105 | 685 | 8/7/2026 |
| 4.0.104 | 1,241 | 7/29/2026 |
| 4.0.103 | 805 | 7/29/2026 |
| 4.0.102 | 141 | 7/28/2026 |
| 4.0.101 | 423 | 7/28/2026 |
Updated NuGet packages