Ejemplo n.º 1
0
        public static int GetDaysInLunarMonth([ExcelArgument(Description = "农历年份")] int lunarYear, [ExcelArgument(Description = "农历月份")] int lunarMonth)
        {
            DateTimeLunar dl   = new DateTimeLunar();
            int           days = dl.GetDaysInLunarMonth(lunarYear, lunarMonth);

            return(days);
        }
Ejemplo n.º 2
0
        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());
        }