summaryrefslogtreecommitdiff
path: root/ext/calendar/php_calendar.h
diff options
context:
space:
mode:
authorMarko Karppinen <markonen@php.net>2002-05-12 15:06:04 +0000
committerMarko Karppinen <markonen@php.net>2002-05-12 15:06:04 +0000
commit554b7684edae7b1173096a01c83c68998c026c3b (patch)
treea8781bd206a3477caf4d37783a705f168332d208 /ext/calendar/php_calendar.h
parentb3de60dbf0ced6506497382642d75cfb977980b7 (diff)
downloadphp-git-554b7684edae7b1173096a01c83c68998c026c3b.tar.gz
Add an option to calculate easter dates based on the Gregorian calendar
during the years 1582-1752. Earlier this was only possible from 1753 onwards. Use the optional parameter CAL_EASTER_ROMAN with easter_days() to enable this. This is a fix for bug #12766. # As you can see, my Sundays are *so* busy...
Diffstat (limited to 'ext/calendar/php_calendar.h')
-rw-r--r--ext/calendar/php_calendar.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/calendar/php_calendar.h b/ext/calendar/php_calendar.h
index 73bc96aede..79c9edf73c 100644
--- a/ext/calendar/php_calendar.h
+++ b/ext/calendar/php_calendar.h
@@ -32,4 +32,19 @@ PHP_FUNCTION(cal_info);
#define phpext_calendar_ptr calendar_module_ptr
+/*
+ * Specifying the easter calculation method
+ *
+ * DEFAULT is Anglican, ie. use Julian calendar before 1753
+ * and Gregorian after that. With ROMAN, the cutoff year is 1582.
+ * ALWAYS_GREGORIAN and ALWAYS_JULIAN force the calendar
+ * regardless of date.
+ *
+ */
+
+#define CAL_EASTER_DEFAULT 0
+#define CAL_EASTER_ROMAN 1
+#define CAL_EASTER_ALWAYS_GREGORIAN 2
+#define CAL_EASTER_ALWAYS_JULIAN 3
+
#endif