internal static string GetLunarHolDay(ChineseDate lunarDate)
        {
            int num;
            int index = (((lunarDate.idate.Year - 0x76d) * 12) + lunarDate.idate.Month) - 1;

            if ((index < 0) || (index >= LunarHolDayArray.Length))
            {
                throw new IndexOutOfRangeException("Invaild lunar day");
            }
            int num3 = LunarHolDayArray[index];

            index = -1;
            if (lunarDate.idate.Day < 15)
            {
                num = 15 - ((num3 >> 4) & 15);
            }
            else
            {
                num = (num3 & 15) + 15;
            }
            if (lunarDate.idate.Day == num)
            {
                index = ((lunarDate.idate.Month - 1) * 2) + ((lunarDate.idate.Day > 15) ? 1 : 0);
            }
            if (index == -1)
            {
                return(string.Empty);
            }
            return(LunarHolDay[index]);
        }
 internal static string GetYearEraName(ChineseDate lunarDate)
 {
     return(Era[(lunarDate.ilunarDate.Year - 4) % 60]);
 }
 internal static string GetLunarMonth(ChineseDate lunarDate)
 {
     return(ChineseMonth[lunarDate.ilunarDate.Month - 1]);
 }
 internal static string GetLunarDay(ChineseDate lunarDate)
 {
     return(ChineseDay[lunarDate.ilunarDate.Day - 1]);
 }
 internal static string GetAnimalsSymbolName(ChineseDate lunarDate)
 {
     return(AnimalsSymbol[(lunarDate.ilunarDate.Year - 4) % 12]);
 }
        public static ChineseDate CalcLunarDate(DateTime date)
        {
            int         lunarYearDays;
            int         num4;
            int         num5;
            int         num6;
            bool        flag     = false;
            ChineseDate date2    = new ChineseDate(date);
            int         spanDays = date2.SpanDays;

            if (spanDays < 0x31)
            {
                num4 = 0x76c;
                if (spanDays < 0x13)
                {
                    num5 = 11;
                    num6 = spanDays + 11;
                }
                else
                {
                    num5 = 12;
                    num6 = spanDays - 0x12;
                }
                goto Label_00A6;
            }
            num4      = 0x76d;
            num5      = 1;
            num6      = 1;
            spanDays -= 0x31;
            while (true)
            {
                lunarYearDays = GetLunarYearDays(num4);
                if (spanDays < lunarYearDays)
                {
                    break;
                }
                spanDays -= lunarYearDays;
                num4++;
            }
Label_0065:
            lunarYearDays = GetLunarMonthDays(num4, num5);
            int num2 = (lunarYearDays << 0x10) >> 0x10;

            if (spanDays >= num2)
            {
                spanDays -= num2;
                if (num5 == GetLeapMonth(num4))
                {
                    flag          = true;
                    lunarYearDays = lunarYearDays >> 0x10;
                    if (spanDays < lunarYearDays)
                    {
                        goto Label_00A1;
                    }
                    spanDays -= lunarYearDays;
                }
                num5++;
                goto Label_0065;
            }
Label_00A1:
            num6 = spanDays + 1;
Label_00A6:
            date2.ilunarDate = new DateTime(num4, num5, num6);
            date2.ileapMonth = flag;
            return(date2);
        }