LunarHelperGetLunarDateInfo 方法

获取指定公历日期的完整农历信息

Definition

命名空间: Suresking.Utility
程序集: Suresking.Utility (在 Suresking.Utility.dll 中) 版本:1.3.22+a27276bb8ffde055e69ff608e98aafba279e1e99
C#
public static LunarHelperDateFullInfo GetLunarDateInfo(
	DateTime date
)

参数

date  DateTime
公历日期

返回值

LunarHelperDateFullInfo
完整的日期信息(公历、农历、干支、生肖、节气、星期、格式化字符串)

示例

C#
var info = LunarHelper.GetLunarDateInfo(new DateTime(2026, 3, 31));
Console.WriteLine(info.FullInfo);

异常

ArgumentOutOfRangeException日期超出支持范围(1900-2049)

参见