timelib_time_dtor(now);
}
+/* {{{ proto DateTime date_create([string time[, DateTimeZone object]])
+*/
PHP_FUNCTION(date_create)
{
zval *timezone_object = NULL;
date_instantiate(date_ce_date, return_value TSRMLS_CC);
date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, timezone_object TSRMLS_CC);
}
+/* }}} */
+/* {{{ proto DateTime::__construct([string time[, DateTimeZone object]])
+*/
PHP_METHOD(DateTime, __construct)
{
zval *timezone_object = NULL;
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
}
}
+/* }}} */
+/* {{{ proto array date_parse(string date)
+*/
PHP_FUNCTION(date_parse)
{
char *date;
}
/* }}} */
+/* {{{ proto string date_format(DateTime object, string format)
+*/
PHP_FUNCTION(date_format)
{
zval *object;
RETURN_STRINGL(str, length, 0);
}
}
+/* }}} */
+/* {{{ proto void date_modify(DateTime object, string modify)
+*/
PHP_FUNCTION(date_modify)
{
zval *object;
timelib_update_ts(dateobj->time, NULL);
timelib_update_from_sse(dateobj->time);
}
+/* }}} */
+/* {{{ proto DateTimeZone date_timezone_get(DateTime object)
+*/
PHP_FUNCTION(date_timezone_get)
{
zval *object;
RETURN_FALSE;
}
}
+/* }}} */
+/* {{{ proto void date_timezone_set(DateTime object, DateTimeZone object)
+*/
PHP_FUNCTION(date_timezone_set)
{
zval *object;
timelib_set_timezone(dateobj->time, timelib_tzinfo_clone(tzobj->tz));
timelib_unixtime2local(dateobj->time, dateobj->time->sse);
}
+/* }}} */
+/* {{{ proto long date_offset_get(DateTime object)
+*/
PHP_FUNCTION(date_offset_get)
{
zval *object;
RETURN_LONG(0);
}
}
+/* }}} */
+/* {{{ proto void date_time_set(DateTime object, long hour, long minute[, long second])
+*/
PHP_FUNCTION(date_time_set)
{
zval *object;
dateobj->time->s = s;
timelib_update_ts(dateobj->time, NULL);
}
+/* }}} */
+/* {{{ proto void date_date_set(DateTime object, long year, long month, long day)
+*/
PHP_FUNCTION(date_date_set)
{
zval *object;
dateobj->time->d = d;
timelib_update_ts(dateobj->time, NULL);
}
+/* }}} */
+/* {{{ proto void date_isodate_set(DateTime object, long year, long week[, long day])
+*/
PHP_FUNCTION(date_isodate_set)
{
zval *object;
timelib_update_ts(dateobj->time, NULL);
}
-
+/* }}} */
static int timezone_initialize(timelib_tzinfo **tzi, /*const*/ char *tz TSRMLS_DC)
{
}
}
+/* {{{ proto DateTimeZone timezone_open(string timezone)
+*/
PHP_FUNCTION(timezone_open)
{
char *tz;
}
((php_timezone_obj *) zend_object_store_get_object(date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC))->tz = tzi;
}
+/* }}} */
+/* {{{ proto DateTimeZone::__construct(string timezone)
+*/
PHP_METHOD(DateTimeZone, __construct)
{
char *tz;
}
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
}
+/* }}} */
+/* {{{ proto string timezone_name_get(DateTimeZone object)
+*/
PHP_FUNCTION(timezone_name_get)
{
zval *object;
RETURN_STRING(tzobj->tz->name, 1);
}
+/* }}} */
+/* {{{ proto string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])
+*/
PHP_FUNCTION(timezone_name_from_abbr)
{
char *abbr;
RETURN_FALSE;
}
}
+/* }}} */
+/* {{{ proto long timezone_offset_get(DateTimeZone object, DateTime object)
+*/
PHP_FUNCTION(timezone_offset_get)
{
zval *object, *dateobject;
RETVAL_LONG(offset->offset);
timelib_time_offset_dtor(offset);
}
+/* }}} */
+/* {{{ proto array timezone_transitions_get(DateTimeZone object)
+*/
PHP_FUNCTION(timezone_transitions_get)
{
zval *object, *element;
add_next_index_zval(return_value, element);
}
}
+/* }}} */
+/* {{{ proto array timezone_identifiers_list()
+*/
PHP_FUNCTION(timezone_identifiers_list)
{
const timelib_tzdb *tzdb;
add_next_index_string(return_value, table[i].id, 1);
};
}
+/* }}} */
+/* proto {{{ array timezone_abbreviations_list()
+*/
PHP_FUNCTION(timezone_abbreviations_list)
{
const timelib_tz_lookup_table *table, *entry;
entry++;
} while (entry->name);
}
-
+/* }}} */
/* {{{ proto bool date_default_timezone_set(string timezone_identifier)
Sets the default timezone used by all date/time functions in a script */