ChineseLunisolarCalendarYjFwkExtensions 1.0.0

Suggested Alternatives

YiJingFramework.Nongli

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package ChineseLunisolarCalendarYjFwkExtensions --version 1.0.0                
NuGet\Install-Package ChineseLunisolarCalendarYjFwkExtensions -Version 1.0.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="ChineseLunisolarCalendarYjFwkExtensions" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ChineseLunisolarCalendarYjFwkExtensions --version 1.0.0                
#r "nuget: ChineseLunisolarCalendarYjFwkExtensions, 1.0.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.
// Install ChineseLunisolarCalendarYjFwkExtensions as a Cake Addin
#addin nuget:?package=ChineseLunisolarCalendarYjFwkExtensions&version=1.0.0

// Install ChineseLunisolarCalendarYjFwkExtensions as a Cake Tool
#tool nuget:?package=ChineseLunisolarCalendarYjFwkExtensions&version=1.0.0                

ChineseLunisolarCalendarYjFwkExtensions

ChineseLunisolarCalendarYjFwkExtensions 为 ChineseLunisolarCalendar 提供了一些扩展方法。

GetYearGanzhi

原本的 ChineseLunisolarCalendarGetSexagenaryYear 的功能,但返回的结果是一个数字,不便于使用。因此此包提供了 GetYearGanzhi 方法:

using ChineseLunisolarCalendarYjFwkExtensions.Extensions;
using System.Globalization;

var dateTime = new DateTime(2023, 8, 16, 12, 41, 23);
var calendar = new ChineseLunisolarCalendar();
var (gan, zhi) = calendar.GetYearGanzhi(dateTime);
Console.WriteLine($"{gan:C}{zhi:C}年"); // 癸卯年

GetShichenDizhi

原本的 ChineseLunisolarCalendar 缺少时辰等功能。因此此包提供了 GetShichenDizhi 方法:

using ChineseLunisolarCalendarYjFwkExtensions.Extensions;
using System.Globalization;

var dateTime = new DateTime(2023, 8, 16, 12, 41, 23);
var calendar = new ChineseLunisolarCalendar();
var shichen = calendar.GetShichenDizhi(dateTime);
Console.WriteLine($"{shichen:C}时"); // 午时
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated