private static int GregorianToFixed(int gregorianYear, int gregorianMonth, int gregorianDay)
{
return (((((((0x16d * (gregorianYear - 1)) + ((int)Math.Floor((double)(((double)(gregorianYear - 1)) / 4.0)))) - ((int)Math.Floor((double)(((double)(gregorianYear - 1)) / 100.0)))) + ((int)Math.Floor((double)(((double)(gregorianYear - 1)) / 400.0)))) + ((int)Math.Floor((double)(((double)((0x16f * gregorianMonth) - 0x16a)) / 12.0)))) + ((gregorianMonth <= 2) ? 0 : (CheckLeapYear(gregorianYear, gregorianMonth) ? -1 : -2))) + gregorianDay);
}