private static DateTime HebrewToGregorian(int hebrewYear, int hebrewMonth, int hebrewDay, int hour, int minute, int second, int millisecond)
{
int num = hebrewYear - 3760;
HebrewCalendar.__DateBuffer lunarDate = new HebrewCalendar.__DateBuffer();
int lunarMonthDay = HebrewCalendar.GetLunarMonthDay(num, lunarDate);
if (hebrewMonth == lunarDate.month && hebrewDay == lunarDate.day)
{
return(new DateTime(num, 1, 1, hour, minute, second, millisecond));
}
int dayDifference = HebrewCalendar.GetDayDifference(lunarMonthDay, hebrewMonth, hebrewDay, lunarDate.month, lunarDate.day);
return(new DateTime(new DateTime(num, 1, 1).Ticks + (long)dayDifference * 864000000000L + Calendar.TimeToTicks(hour, minute, second, millisecond)));
}