def haab_monthcalendar(baktun=None, katun=None, tun=None, uinal=None, kin=None, jdc=None):
if not jdc:<EOL><INDENT>jdc = to_jd(baktun, katun, tun, uinal, kin)<EOL><DEDENT>haab_number, haab_month = to_haab(jdc)<EOL>first_j = jdc - haab_number + <NUM_LIT:1><EOL>tzolkin_start_number, tzolkin_start_name = to_tzolkin(first_j)<EOL>gen_longcount = longcount_generator(*from_jd(first_j))<EOL>gen_tzolkin = tzolkin_generator(tzolkin_start_number, tzolkin_start_name)<EOL>lpad = tzolkin_start_number - <NUM_LIT:1><EOL>rpad = <NUM_LIT> - (tzolkin_start_number + <NUM_LIT> % <NUM_LIT>)<EOL>monlen = month_length(haab_month)<EOL>days = [None] * lpad + list(range(<NUM_LIT:1>, monlen + <NUM_LIT:1>)) + rpad * [None]<EOL>def g(x, generate):<EOL><INDENT>if x is None:<EOL><INDENT>return None<EOL><DEDENT>return next(generate)<EOL><DEDENT>return [[(k, g(k, gen_tzolkin), g(k, gen_longcount)) for k in days[i:i + <NUM_LIT>]] for i in range(<NUM_LIT:0>, len(days), <NUM_LIT>)]<EOL>
For a given long count, return a calender of the current haab month, divided into tzolkin "weeks