def gcal2jd(year, month, day):
 year = int(year)
 month = int(month)
 day = int(day)
 a = ipart(((month - 14) / 12.0))
 jd = ipart(((1461 * ((year + 4800) + a)) / 4.0))
 jd += ipart(((367 * ((month - 2) - (12 * a))) / 12.0))
 x = ipart((((year + 4900) + a) / 100.0))
 jd -= ipart(((3 * x) / 4.0))
 jd += (day - 2432075.5)
 jd -= 0.5
 return (MJD_0, jd)

def gcal2jd ( year , month , day ) : year = int ( year ) month = int ( month ) day = int ( day ) a = ipart ( ( ( month - 14 ) / 12.0 ) ) jd = ipart ( ( ( 1461 * ( ( year + 4800 ) + a ) ) / 4.0 ) ) jd += ipart ( ( ( 367 * ( ( month - 2 ) - ( 12 * a ) ) ) / 12.0 ) ) x = ipart ( ( ( ( year + 4900 ) + a ) / 100.0 ) ) jd -= ipart ( ( ( 3 * x ) / 4.0 ) ) jd += ( day - 2432075.5 ) jd -= 0.5 return ( MJD_0 , jd )
gregorian calendar date to julian date .