xref: /PHP-7.1/ext/calendar/php_calendar.h (revision ec89c850)
1 #ifndef PHP_CALENDAR_H
2 #define PHP_CALENDAR_H
3 
4 extern zend_module_entry calendar_module_entry;
5 #define	calendar_module_ptr &calendar_module_entry
6 
7 #include "php_version.h"
8 #define PHP_CALENDAR_VERSION PHP_VERSION
9 
10 /* Functions */
11 
12 PHP_MINIT_FUNCTION(calendar);
13 PHP_MINFO_FUNCTION(calendar);
14 
15 PHP_FUNCTION(jdtogregorian);
16 PHP_FUNCTION(gregoriantojd);
17 PHP_FUNCTION(jdtojulian);
18 PHP_FUNCTION(juliantojd);
19 PHP_FUNCTION(jdtojewish);
20 PHP_FUNCTION(jewishtojd);
21 PHP_FUNCTION(jdtofrench);
22 PHP_FUNCTION(frenchtojd);
23 PHP_FUNCTION(jddayofweek);
24 PHP_FUNCTION(jdmonthname);
25 PHP_FUNCTION(easter_days);
26 PHP_FUNCTION(easter_date);
27 PHP_FUNCTION(unixtojd);
28 PHP_FUNCTION(jdtounix);
29 PHP_FUNCTION(cal_from_jd);
30 PHP_FUNCTION(cal_to_jd);
31 PHP_FUNCTION(cal_days_in_month);
32 PHP_FUNCTION(cal_info);
33 
34 #define phpext_calendar_ptr calendar_module_ptr
35 
36 /*
37  * Specifying the easter calculation method
38  *
39  * DEFAULT is Anglican, ie. use Julian calendar before 1753
40  * and Gregorian after that. With ROMAN, the cutoff year is 1582.
41  * ALWAYS_GREGORIAN and ALWAYS_JULIAN force the calendar
42  * regardless of date.
43  *
44  */
45 
46 #define CAL_EASTER_DEFAULT			0
47 #define CAL_EASTER_ROMAN			1
48 #define CAL_EASTER_ALWAYS_GREGORIAN	2
49 #define CAL_EASTER_ALWAYS_JULIAN	3
50 
51 #endif
52