Home | History | Annotate | Download | only in cal

Lines Matching defs:reform

65 #define	FIRST_MISSING_DAY 	reform->first_missing_day
66 #define NUMBER_MISSING_DAYS reform->missing_days
107 ((yr) <= reform->year ? j_leap_year((yr), 3, 1) : \
137 * side effects of this upon the Gregorian reform is that two Julian
143 /* number of centuries since the reform, not inclusive */
145 ((yr) > reform->year ? ((yr) / 100) - (reform->year / 100) : 0)
147 /* number of centuries since the reform whose modulo of 400 is 0 */
149 ((yr) > reform->year ? ((yr) / 400) - (reform->year / 400) : 0)
155 static struct reform {
165 } *reform, reforms[] = {
282 if (reform == NULL)
309 year = reform->year;
314 month = reform->month;
662 * Given a description of date on which the Gregorian Reform was
667 * reform point.
728 static struct reform Goestheveezl;
730 reform = &Goestheveezl;
731 reform->country = "Bompzidaize";
732 reform->year = year;
733 reform->month = month;
734 reform->date = date;
742 for (reform = &reforms[0]; reform->year; reform++) {
743 if (strcasecmp(p, reform->country) == 0)
754 for (reform = &reforms[0]; reform->year; reform++) {
755 if ((year == 0 || year == reform->year) &&
756 (month == 0 || month == reform->month) &&
757 (date == 0 || month == reform->date))
761 if (i <= reform->ambiguity)
762 errx(1, "%s: ambiguous short reform date specification", p);
768 if (reform->year == 0)
769 errx(1, "reform name %s invalid", p);
774 reform->missing_days =
775 j_leap_days(reform->year, reform->month, reform->date) -
776 g_leap_days(reform->year, reform->month, reform->date) -
779 reform->first_missing_day =
780 (reform->year - 1) * 365 +
781 day_in_year(reform->date, reform->month, reform->year) +
783 j_leap_days(reform->year, reform->month, reform->date);
789 diw = day_in_week(reform->date, reform->month, reform->year);
790 diw = (diw + 8 - (reform->date % 7)) % 7;
791 diy = day_in_year(1, reform->month, reform->year);
802 reform_day_array(reform->month + i, reform->year,
812 * skipped during a reform period.
821 * If the reform was in the month of october or later, then
858 if (*date < reform->date ||
859 *date >= reform->date + reform->missing_days) {
922 "[-R reform-spec]\n [[month] year]\n");