Cats.Helpers.EthiopianDate.FixedToGregorian C# (CSharp) Method

FixedToGregorian() private static method

Fixeds to gregorian.
private static FixedToGregorian ( int fixedDate, int &year, int &month, int &day ) : void
fixedDate int The fixed date.
year int The year.
month int The month.
day int The day.
return void
        private static void FixedToGregorian(int fixedDate, ref int year, ref int month, ref int day)
        {
            GregorianCalendar gregorianCalendar = new GregorianCalendar();
            year = GregorianYearFromFixed(fixedDate);
            int num2 = fixedDate - GregorianToFixed(year, 1, 1);
            int num = (fixedDate < GregorianToFixed(year, 3, 1)) ? 0 : (gregorianCalendar.IsLeapYear(year) ? 1 : 2);
            month = (int)Math.Floor((double)(((double)((12 * (num2 + num)) + 0x175)) / 367.0));
            day = (fixedDate - GregorianToFixed(year, month, 1)) + 1;
        }