%doctype; [*calendar/calendars]1 %include;css %include;hed %message_to_wizard;

[*calendar/calendars]1

%define;french_day(xx) %apply;nth%with; /Primidi/Duodi/Tridi/Quartidi/Quintidi/Sextidi/Septidi/Octidi/Nonidi/Décadi/Primidi/Duodi/Tridi/Quartidi/Quintidi/Sextidi/Septidi/Octidi/Nonidi/Décadi/Primidi/Duodi/Tridi/Quartidi/Quintidi/Sextidi/Septidi/Octidi/Nonidi/Décadi/ %and;xx%end; %end; %define;nb_days(xx) %apply;nth%with; /31/28/31/30/31/30/31/31/30/31/30/31%and; xx%end; %end; %define;compute_age1(z1,z2,z3) %if;(z1 > 0) %if;(z1 = 1)[one year old]%else;z1 [years old]%end; %if;(z2 > 0 or z3 > 0), %end; %end; %if;(z2 > 0) %if;(z2 = 1)[one month old]%else;z2 [months old]%end; %if;(z3 > 0), %end; %end; %if;(z3 > 0) %if;(z3 = 1)[one day old]%else;z3 [days old]%end; %end; %end; %define;compute_age(z1,z2) %let;l1;%apply;nb_days(z2.month)%in; %let;l2;%expr(z1.julian_day - z2.julian_day)%in; %if;(z1.month > z2.month) %if;(z1.day >= z2.day) %apply;compute_age1(z1.year - z2.year,z1.month - z2.month,z1.day - z2.day) %else; %apply;compute_age1(z1.year - z2.year,z1.month - z2.month - 1,l1 + z1.day - z2.day) %end; %end; %if;(z1.month = z2.month) %if;(z1.day >= z2.day) %apply;compute_age1(z1.year - z2.year,0,z1.day - z2.day) %else; %apply;compute_age1(z1.year - z2.year - 1,11,l1 + z1.day - z2.day) %end; %end; %if;(z1.month < z2.month) %if;(z1.day >= z2.day) %apply;compute_age1(z1.year - z2.year - 1,12 + z1.month - z2.month,z1.day - z2.day) %else; %apply;compute_age1(z1.year - z2.year - 1,11 + z1.month - z2.month,l1 + z1.day - z2.day) %end; %end; %if;(l2 > 31) (%l2; [days old])%end; %end; %define;fun_day(ccc, nnn) %end; %define;fun_month(ccc, nnn, vvv, lll) %end; %define;fun_year(ccc, nnn) %end; %define;fun_julian_year(ccc, nnn) %let;year; %if;(date.julian.month < 3 or date.julian.month = 3 and date.julian.day < 25) %expr(date.nnn.year - 1)/%expr(date.nnn.year % 10) %else;%date.nnn.year;%end; %in; %end; %define;calendar(ccc, nnn, vvv, lll, fun_yyy) %if;([!dates order]0 = "ddmmyyyy") %apply;fun_day("ccc", "nnn") %apply;fun_month("ccc", "nnn", "vvv", "lll") %apply;fun_yyy("ccc", "nnn") %elseif;([!dates order]0 = "mmddyyyy") %apply;fun_month("ccc", "nnn", "vvv", "lll") %apply;fun_day("ccc", "nnn") %apply;fun_yyy("ccc", "nnn") %else; %apply;fun_yyy("ccc", "nnn") %apply;fun_month("ccc", "nnn", "vvv", "lll") %apply;fun_day("ccc", "nnn") %end; %end;

%hidden;

%if;([!dates order] = "ddmmyyyy") %elseif;([!dates order] = "mmddyyyy") %else; %end; %apply;calendar("g", "gregorian", 12, [(month)], "fun_year") %apply;calendar("j", "julian", 12, [(month)], "fun_julian_year") %apply;calendar("f", "french", 13, [(french revolution month)], "fun_year") %apply;calendar("h", "hebrew", 13, [(hebrew month)], "fun_year")
 [*year/month/day]2 [*year/month/day]1 [*year/month/day]0[*year/month/day]1 [*year/month/day]2 [*year/month/day]0[*year/month/day]0 [*year/month/day]1 [*year/month/day]2 
[*gregorian/julian/french/hebrew]0
[*gregorian/julian/french/hebrew]1
[*gregorian/julian/french/hebrew]2
[*gregorian/julian/french/hebrew]3
  • [*year/month/day]2[:] %apply;nth([(week day)], date.week_day) %if;(date.julian_day = today.julian_day)%sp;%time;%end;.
  • %if;(date.julian_day > 2375839)
  • [*gregorian/julian/french/hebrew]2[:] %apply;french_day(date.french.day),%sp;%date.french.day;  %apply;nth([(french revolution month)], date.french.month -1) %sp;an %date.french.year.roman;.
  • %end;
  • [*moon age/new moon/first quarter/full moon/last quarter]0[:] %date.moon_age; %if;(date.moon_age = 1) [year/month/day]2. %else; [year/month/day]2s.%end; %if;(date.moon_phase.index != 0)
  • %apply;capitalize%with; %apply;nth([moon age/new moon/first quarter/full moon/last quarter], date.moon_phase.index)[:]%sp; %date.moon_phase.hour; h %date.moon_phase.minute; min UT. %end;
  • %end; %if;(date.julian_day > 1721425 and today.julian_day != date.julian_day)
  • [*age][:] %if;(today.julian_day > date.julian_day) %apply;compute_age("today","date"). %else; -%apply;compute_age("date","today"). %end;
  • %end;
  • [*julian day][:]%sp; %if;(date.julian_day < 1000)%date.julian_day;. %else;%date.julian_day.sep1000;. %end;
%if;(wizard or friend)

[*statistics][:]%sp; %hidden; [before (date)] %if;([!dates order]0 = "ddmmyyyy") %elseif;([!dates order]0 = "mmddyyyy") %else; ) %end;

%end;
%include;trl %include;copyr