long year, golden, solar, lunar, pfm, dom, tmp, easter;
long method = CAL_EASTER_DEFAULT;
+ /* Default to the current year if year parameter is not given */
+ {
+ time_t a;
+ struct tm b;
+ time(&a);
+ php_localtime_r(&a, &b);
+ year = 1900 + b.tm_year;
+ }
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
- "l|l", &year, &method) == FAILURE) {
+ "|ll", &year, &method) == FAILURE) {
return;
}
}
/* }}} */
-/* {{{ proto int easter_days([int year])
+/* {{{ proto int easter_days([int year, [int method]])
Return the number of days after March 21 that Easter falls on for a given year (defaults to current year) */
PHP_FUNCTION(easter_days)
{