def jdn_to_gdate(jdn):
<EOL>l = jdn + <NUM_LIT>  <EOL>n = (<NUM_LIT:4> * l) // <NUM_LIT><EOL>l = l - (<NUM_LIT> * n + <NUM_LIT:3>) // <NUM_LIT:4>  <EOL>i = (<NUM_LIT> * (l + <NUM_LIT:1>)) // <NUM_LIT>  <EOL>l = l - (<NUM_LIT> * i) // <NUM_LIT:4> + <NUM_LIT>  <EOL>j = (<NUM_LIT> * l) // <NUM_LIT><EOL>day = l - (<NUM_LIT> * j) // <NUM_LIT><EOL>l = j // <NUM_LIT:11>  <EOL>month = j + <NUM_LIT:2> - (<NUM_LIT:12> * l)<EOL>year = <NUM_LIT:100> * (n - <NUM_LIT>) + i + l  <EOL>return datetime.date(year, month, day)<EOL>
Convert from the Julian day to the Gregorian day.

Algorithm from 'Julian and Gregorian Day Numbers' by Peter Meyer.
Return: day, month, year