/// <summary> /// /// </summary> /// <param name="公历时间"></param> /// <returns></returns> public static HuangLiModel 获取黄历(DateTime 公历时间) { var nongli = ChineseCalendar.计算农历(公历时间); var result = new HuangLiModel() { TianGanDiZhi = TianGanDiZhiHelper.获取天干地支(公历时间), NongLiYearDescn = nongli.YearDescn, NongLiYear = nongli.Year, NongLiMonthDescn = nongli.MonthDescn, NongLiMonth = nongli.Month, NongLiDayDescn = nongli.DayDescn, NongLiDay = nongli.Day, GongLiYear = 公历时间.Year, GongLiYearDescn = 公历时间.Year.ToString(), GongLiMonth = 公历时间.Month, GongLiMonthDescn = 公历时间.Month.ToString(), GongLiDay = 公历时间.Day, GongLiDayDescn = 公历时间.Day.ToString(), ShengXiao = ChineseCalendar.计算生肖(公历时间), IsLeapYear = nongli.IsLeapYear, IsLeapMonth = nongli.IsLeapMonth, LeapMonth = nongli.LeapMonth }; return(result); }