def jd2jcal(jd):
 j = (jd + 1402)
 k = ipart(((j - 1) / 1461.0))
 l = (j - (1461.0 * k))
 n = (ipart(((l - 1) / 365.0)) - ipart((l / 1461.0)))
 i = ((l - (365.0 * n)) + 30.0)
 j = ipart(((80.0 * i) / 2447.0))
 day = (i - ipart(((2447.0 * j) / 80.0)))
 i = ipart((j / 11.0))
 month = ((j + 2) - (12.0 * i))
 year = ((((4 * k) + n) + i) - 4716.0)
 return (int(year), int(month), int(day))

def jd2jcal ( jd ) : j = ( jd + 1402 ) k = ipart ( ( ( j - 1 ) / 1461.0 ) ) l = ( j - ( 1461.0 * k ) ) n = ( ipart ( ( ( l - 1 ) / 365.0 ) ) - ipart ( ( l / 1461.0 ) ) ) i = ( ( l - ( 365.0 * n ) ) + 30.0 ) j = ipart ( ( ( 80.0 * i ) / 2447.0 ) ) day = ( i - ipart ( ( ( 2447.0 * j ) / 80.0 ) ) ) i = ipart ( ( j / 11.0 ) ) month = ( ( j + 2 ) - ( 12.0 * i ) ) year = ( ( ( ( 4 * k ) + n ) + i ) - 4716.0 ) return ( int ( year ) , int ( month ) , int ( day ) )
julian calendar date for the given julian date .