public static int GetDaysInLunarMonth([ExcelArgument(Description = "农历年份")] int lunarYear, [ExcelArgument(Description = "农历月份")] int lunarMonth) { DateTimeLunar dl = new DateTimeLunar(); int days = dl.GetDaysInLunarMonth(lunarYear, lunarMonth); return(days); }
public static string GetSolarDate([ExcelArgument(Description = "农历年份")] int lunarYear, [ExcelArgument(Description = "农历月份")] int lunarMonth, [ExcelArgument(Description = "农历日")] int lunarDay, [ExcelArgument(Description = "该月是否农历润月")] bool theMonthIsLeap) { DateTimeLunar dl = new DateTimeLunar(); DateTime dt = dl.GetSolarDate(lunarYear, lunarMonth, lunarDay, theMonthIsLeap); return(dt.ToShortDateString()); }