def next_haab(month, jd):
if jd < EPOCH:<EOL><INDENT>raise IndexError("<STR_LIT>")<EOL><DEDENT>hday, hmonth = to_haab(jd)<EOL>if hmonth == month:<EOL><INDENT>days = <NUM_LIT:1> - hday<EOL><DEDENT>else:<EOL><INDENT>count1 = _haab_count(hday, hmonth)<EOL>count2 = _haab_count(<NUM_LIT:1>, month)<EOL>days = (count2 - count1) % <NUM_LIT><EOL><DEDENT>return jd + days<EOL>
For a given haab month and a julian day count, find the next start of that month on or after the JDC