Converts from a supported calendar to Julian Day Count */
PHP_FUNCTION(cal_to_jd)
{
- long cal, month, day, year, jdate;
+ long cal, month, day, year;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &cal, &month, &day, &year) != SUCCESS) {
RETURN_FALSE;
RETURN_FALSE;
}
- jdate = cal_conversion_table[cal].to_jd(year, month, day);
- RETURN_LONG(jdate);
+ RETURN_LONG(cal_conversion_table[cal].to_jd(year, month, day));
}
/* }}} */
PHP_FUNCTION(gregoriantojd)
{
long year, month, day;
- int jdate;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
- jdate = GregorianToSdn(year, month, day);
-
- RETURN_LONG(jdate);
+ RETURN_LONG(GregorianToSdn(year, month, day));
}
/* }}} */
PHP_FUNCTION(juliantojd)
{
long year, month, day;
- int jdate;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
- jdate = JulianToSdn(year, month, day);
-
- RETURN_LONG(jdate);
+ RETURN_LONG(JulianToSdn(year, month, day));
}
/* }}} */
PHP_FUNCTION(jewishtojd)
{
long year, month, day;
- int jdate;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
- jdate = JewishToSdn(year, month, day);
-
- RETURN_LONG(jdate);
+ RETURN_LONG(JewishToSdn(year, month, day));
}
/* }}} */
PHP_FUNCTION(frenchtojd)
{
long year, month, day;
- int jdate;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &month, &day, &year) == FAILURE) {
RETURN_FALSE;
}
- jdate = FrenchToSdn(year, month, day);
-
- RETURN_LONG(jdate);
+ RETURN_LONG(FrenchToSdn(year, month, day));
}
/* }}} */