%( birth death : month week_day moon_age tf1/tl1 = bmdm %) %let;lm1;[(month)]0%in; %let;lm2;[(month)]1%in; %let;lm3;[(month)]2%in; %let;lm4;[(month)]3%in; %let;lm5;[(month)]4%in; %let;lm6;[(month)]5%in; %let;lm7;[(month)]6%in; %let;lm8;[(month)]7%in; %let;lm9;[(month)]8%in; %let;lm10;[(month)]9%in; %let;lm11;[(month)]10%in; %let;lm12;[(month)]11%in; %let;ld0;[(week day)]0%in; %let;ld1;[(week day)]1%in; %let;ld2;[(week day)]2%in; %let;ld3;[(week day)]3%in; %let;ld4;[(week day)]4%in; %let;ld5;[(week day)]5%in; %let;ld6;[(week day)]6%in; %define;lex_month(xx)%lmxx;%end; %define;lex_week_day(xx)%ldxx;%end; %define;lex_moon_age(xx) xx %if;(xx = 1), [moon age/new moon/first quarter/full moon/last quarter]1 %elseif;(xx = 8), [moon age/new moon/first quarter/full moon/last quarter]2 %elseif;(xx = 16), [moon age/new moon/first quarter/full moon/last quarter]3 %elseif;(xx = 24), [moon age/new moon/first quarter/full moon/last quarter]4 %end; %end; %define;stat_anc(z1,z2) %foreach;ancestor_level(l_v) %if;(level > 1 and (evar.only != "on" or level = l_v)) %foreach;ancestor; %if;(z1 != "" and z2 != "" and ancestor.same = "") %let;l1;%z2;%in; %incr_count; %apply;add_in_sorted_list(ancestor.sex,l1,ancestor.index) %end; %end; %end; %end; %end; %define;stat_des(z1,z2,curlev,maxlev) %if;(z1 != "" and z2 != "" and sex != 2) %let;l1;%z2;%in; %incr_count; %apply;add_in_sorted_list(sex,l1,index) %end; %foreach;family; %if;(curlev < maxlev and family.desc_level = curlev and has_children) %family.set_infinite_desc_level; %foreach;child; %apply;stat_des("z1","z2",curlev+1,maxlev) %end; %end; %end; %end; %define;stat1a(z1,z2,z3) %reset_count; %foreach;sorted_list_item; %if;(prev_item.2 != item.2 or prev_item.1 != item.1) %reset_count;%incr_count; %expr(count - 1) %end; %end; %end; %define;stat1b(z1) %reset_count; %foreach;sorted_list_item; %incr_count; %if;(next_item.2 != item.2 or next_item.1 != item.1) %let;l1;%expr(item.2 + z1)%in; %let;l2;%if;(count > l_max_width)%l_max_width;%else;%count;%end;%in; %count; %reset_count; %end; %end; %end; %define;stat1(z1,z2,z3) %if;(not cancel_links and l_max_dates > count) %apply;stat1a(z1,"z2","z3") %else; %apply;stat1b(z1) %end; %end; %define;stat_month(z1,z2) %if;("z1" = "anc") %apply;stat_anc("ancestor.z2_date.day","ancestor.z2_date.month") %else; %apply;stat_des("z2_date.day","z2_date.month",0,l_v) %end;
%reset_count;%empty_sorted_list;%apply;stat_month("anc","birth") | %reset_count;%empty_sorted_list;%apply;stat_month("anc","death") | %else;%reset_count;%reset_desc_level;%empty_sorted_list;%apply;stat_month("des","birth") | %reset_count;%reset_desc_level;%empty_sorted_list;%apply;stat_month("des","death") | %end;
%reset_count;%empty_sorted_list;%apply;stat_week_day("anc","birth") | %reset_count;%empty_sorted_list;%apply;stat_week_day("anc","death") | %else;%reset_count;%reset_desc_level;%empty_sorted_list;%apply;stat_week_day("des","birth") | %reset_count;%reset_desc_level;%empty_sorted_list;%apply;stat_week_day("des","death") | %end;
%reset_count;%empty_sorted_list;%apply;stat_moon_age("anc","birth") | %reset_count;%empty_sorted_list;%apply;stat_moon_age("anc","death") | %else;%reset_count;%reset_desc_level;%empty_sorted_list;%apply;stat_moon_age("des","birth") | %reset_count;%reset_desc_level;%empty_sorted_list;%apply;stat_moon_age("des","death") | %end;