def jdn_to_hdate(jdn):
<EOL>date = jdn_to_gdate(jdn)<EOL>year = date.year + <NUM_LIT><EOL>jdn_tishrey1 = hdate_to_jdn(HebrewDate(year, <NUM_LIT:1>, <NUM_LIT:1>))<EOL>jdn_tishrey1_next_year = hdate_to_jdn(HebrewDate(year + <NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:1>))<EOL>if jdn_tishrey1_next_year <= jdn:<EOL><INDENT>year = year + <NUM_LIT:1><EOL>jdn_tishrey1 = jdn_tishrey1_next_year<EOL>jdn_tishrey1_next_year = hdate_to_jdn(HebrewDate(year + <NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:1>))<EOL><DEDENT>size_of_year = get_size_of_hebrew_year(year)<EOL>days = jdn - jdn_tishrey1<EOL>if days >= (size_of_year - <NUM_LIT>):  <EOL><INDENT>days = days - (size_of_year - <NUM_LIT>)<EOL>month = days * <NUM_LIT:2> // <NUM_LIT><EOL>day = days - (month * <NUM_LIT> + <NUM_LIT:1>) // <NUM_LIT:2> + <NUM_LIT:1><EOL>month = month + <NUM_LIT:4> + <NUM_LIT:1><EOL>if size_of_year > <NUM_LIT> and month <= <NUM_LIT:6>:<EOL><INDENT>month = month + <NUM_LIT:8><EOL><DEDENT><DEDENT>else:  <EOL><INDENT>if size_of_year % <NUM_LIT:10> > <NUM_LIT:4> and days == <NUM_LIT>:   <EOL><INDENT>month = <NUM_LIT:1><EOL>day = <NUM_LIT:30><EOL><DEDENT>elif size_of_year % <NUM_LIT:10> > <NUM_LIT:4> and days > <NUM_LIT>:  <EOL><INDENT>month = (days - <NUM_LIT:1>) * <NUM_LIT:2> // <NUM_LIT><EOL>day = days - (month * <NUM_LIT> + <NUM_LIT:1>) // <NUM_LIT:2><EOL><DEDENT>elif size_of_year % <NUM_LIT:10> < <NUM_LIT:4> and days > <NUM_LIT>:  <EOL><INDENT>month = (days + <NUM_LIT:1>) * <NUM_LIT:2> // <NUM_LIT><EOL>day = days - (month * <NUM_LIT> + <NUM_LIT:1>) // <NUM_LIT:2> + <NUM_LIT:2><EOL><DEDENT>else:  <EOL><INDENT>month = days * <NUM_LIT:2> // <NUM_LIT><EOL>day = days - (month * <NUM_LIT> + <NUM_LIT:1>) // <NUM_LIT:2> + <NUM_LIT:1><EOL><DEDENT>month = month + <NUM_LIT:1><EOL><DEDENT>return HebrewDate(year, month, day)<EOL>
Convert from the Julian day to the Hebrew day.