NewLife.Holiday 1.6.2026.1201

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

NewLife.Holiday - Chinese Holiday Library

GitHub License NuGet Downloads NuGet test locales

Chinese holiday and adjusted-workday identification library with a built-in annual holiday database, lunar festival support and fully offline operation.

Installation

dotnet add package NewLife.Holiday

Quick start

using NewLife.Holiday;

var isHoliday = "2026-10-01".ToDateTime().IsChinaHoliday();

Guangxi March 3rd Festival:

using NewLife.Holiday;

var isHoliday = "2026-04-18".ToDateTime().IsGuangxiHoliday();

Localized holiday names

HolidayInfo.DisplayName returns the holiday name in the current UI language, while Name keeps the original Chinese source:

var info = HolidayExtensions.China.Query("2026-02-15".ToDateTime()).FirstOrDefault();
Console.WriteLine(info?.DisplayName); // Spring Festival

The word list ships 11 languages (English, Simplified Chinese, Traditional Chinese, Spanish, German, Japanese, French, Portuguese, Russian, Korean and Arabic); unsupported languages fall back to Chinese.

Logging

ChinaHoliday and GuangxiHoliday accept an ILog in the constructor. The default is a null logger, so the library stays silent unless you opt in:

using NewLife.Log;
using NewLife.Holiday;

XTrace.UseConsole();
var holiday = new ChinaHoliday(XTrace.Log);
// [ChinaHoliday]Loaded 103 holiday records from 8 embedded resources for [China].

Log messages are translated with the current log language (Localization.LogCulture, falling back to Localization.Culture).

Ecosystem Map

NewLife is a layered ecosystem of independently versioned open-source projects. The map below is shared verbatim by every NewLife repository; each project links to its repository and its primary NuGet package.

Project What it does Downloads
Foundation
NewLife.Core Logging, configuration, caching, networking, serialization, scheduling and APM tracing. NuGet
NewLife.XCode Data middleware: single tables at the tens-of-billions scale, automatic sharding, read-write splitting, 10+ databases. NuGet
NewLife.Net High-performance network library: 1.77M pps / 14.5 Gbps on a single machine (TCP 1KB, 2026-10), 4M long-lived TCP connections. NuGet
NewLife.Remoting Protocol communication and RPC framework for client/server applications and IoT devices. NuGet
NewLife.Agent Installs .NET applications as OS daemons: Windows services and Linux systemd. NuGet
NewLife.Templates dotnet new project templates for console, web, API, service, data and IoT projects. NuGet
Data & Messaging
NewLife.Redis Redis client with microsecond latency, millions of ops/s and built-in message queues. NuGet
NewLife.RocketMQ Pure managed RocketMQ client for Apache RocketMQ and Alibaba Cloud Message Queue. NuGet
NewLife.MQTT MQTT client and server, including Alibaba Cloud IoT connectivity. NuGet
NewLife.NovaDb Hybrid database in C#: embedded or networked, relational, time-series, message queue and KV in one. NuGet
NewLife.MySql MySql driver and helper layer built on the NewLife data stack. NuGet
NewLife.TDengine Pure managed TDengine ADO.NET driver with REST, WebSocket and native RPC transports, no native dependency. NuGet
NewLife.Presto Pure C# Presto/Trino ADO.NET driver with zero third-party dependencies and XCode ORM integration. NuGet
Web & Distributed
NewLife.Cube Rapid admin-platform framework: permissions, SSO, OAuth server and CRUD scaffolding. NuGet
NewLife.Cube.React Decoupled front-end sample for Cube: WebAPI backend with Swagger plus React, Vue and Blazor clients. NuGet
Stardust Distributed service platform: node management, APM, configuration center, registry and release center. NuGet
AntJob Distributed task and real-time data scheduling platform with sharding, retries and backfill. NuGet
AI & Vision
NewLife.AI Unified client for 46 LLM providers plus ChatAI, a ready-to-run web chat application. NuGet
NewLife.Imaging Pure managed imaging foundation: pixel model, codec contracts, drawing and metadata with zero native dependencies. —
NewLife.Vision Vision algorithms: OCR, barcodes, object detection and face recognition on top of NewLife.Imaging. —
NewLife.ML Tabular machine learning for .NET: turn database tables and Excel sheets into deployable prediction and classification models. —
Industrial & IoT
NewLife.IoT IoT standard library defining protocol contracts and device abstractions. NuGet
NewLife.Modbus Modbus TCP/RTU/ASCII implementation on top of NewLife.IoT. NuGet
NewLife.Siemens Siemens PLC protocol on top of NewLife.IoT. NuGet
NewLife.Omron Omron PLC protocol on top of NewLife.IoT. NuGet
NewLife.Melsec Mitsubishi Melsec PLC protocol on top of NewLife.IoT. NuGet
NewLife.Schneider Schneider PLC communication driver built on Modbus TCP. NuGet
NewLife.OPC OPC client for industrial data access. —
NewLife.BACnet BACnet building-automation protocol stack. NuGet
NewLife.LoRa LoRaWAN low-power wide-area protocol for long-range IoT connectivity. NuGet
ZeroIoT Lightweight open-source IoT platform with gateway and device management. —
Vehicle Telematics
NewLife.JT808 JT/T 808 vehicle positioning protocol: 70+ message bodies, 2011/2013/2019. NuGet
NewLife.JT809 JT/T 809 platform-to-platform protocol for transport authorities. NuGet
NewLife.JT1078 JT/T 1078 in-vehicle video: RTP parsing, FLV/fMP4 remuxing and live streaming. NuGet
Domain Components
NewLife.Office One package for Excel, Word, PPT, PDF and 15+ document formats. NuGet
NewLife.Audio Cross-platform audio: codecs, device I/O, DSP, containers and streaming. NuGet
NewLife.Video Video codecs, container formats, frame processing and streaming. NuGet
NewLife.Map Unified interface over Baidu, AMap, Tencent and Tianditu with geocoding and coordinate conversion. NuGet
NewLife.IP IPv4 geolocation with an offline memory-mapped database and an online API fallback. NuGet
NewLife.Holiday Chinese holiday and adjusted-workday identification library with built-in annual data and lunar festival support, fully offline. NuGet
Tools & Products
CrazyCoder Developer toolbox: network, serial port, crypto, regex, Modbus and MQTT. NuGet
NewLife.UnitTest Unit test extensions: test base classes, data-driven tests and dependency-injection helpers. NuGet
GitCandy Self-hosted Git source code management system. —
LuckyClover Installs the matching .NET runtime automatically when launched from an older host. —

Badges show the primary package of each project; theme, extension and satellite packages are listed on their NuGet pages. The 30+ packages not listed here (FTP, Office extensions, protocol drivers and more) are available under the NewLifeX organization and on newlifex.com.

Documentation

License

MIT License © 2002-2026 NewLife Team

GitHub | Website

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 NewLife.Holiday:

Package Downloads
NewLife.ChatAI

集对话前端、统一 AI 网关、Agent 平台于一身的完整 AI 应用。支持多轮对话、流式输出、函数调用、图像生成、会话管理与使用量统计

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.6.2026.1201 96 12/1/2026
1.6.2026.1201-beta1226 65 12/1/2026
1.5.2026.1107-beta0423 101 11/7/2026
1.5.2026.1024 349 10/24/2026
1.5.2026.1024-beta0312 108 10/24/2026
1.4.2026.1022-beta0136 112 10/22/2026
1.4.2026.1019-beta1205 135 10/19/2026
1.4.2026.1019-beta0441 106 10/19/2026
1.4.2026.1018-beta1723 102 10/18/2026
1.4.2026.1017-beta1409 96 10/17/2026
1.4.2026.1016-beta1413 107 10/16/2026
1.4.2026.302-beta0609 196 3/2/2026
1.4.2026.301-beta0612 141 3/1/2026
1.4.2026.211-beta0609 140 2/11/2026
1.4.2026.206 1,437 2/6/2026
1.4.2026.206-beta1417 142 2/6/2026
1.3.2026.206-beta1252 150 2/6/2026
1.3.2026.114-beta0610 157 1/14/2026
1.3.2026.102-beta1643 156 1/2/2026
1.3.2025.1112-beta0613 361 11/12/2025
Loading failed

新增 2027 年全国法定节假日与调休上班数据;新增 2027 年广西三月三预测数据并同步 2026 年安排;补充全国节假日与广西三月三年度判定测试;升级 NewLife.Core 至 12.1.2026.1201、NewLife.UnitTest 至 1.2.2026.1201;升级 Microsoft.SourceLink.GitHub 至 11.0.100、Microsoft.NET.Test.Sdk 至 18.12.0、coverlet.collector 至 10.1.1