php_calendar.h 1.2 KB

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