bjori Sun Sep 10 17:01:10 2006 UTC Modified files: /php-src/ext/date php_date.c Log: Add protos http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.116&r2=1.117&diff_format=u Index: php-src/ext/date/php_date.c diff -u php-src/ext/date/php_date.c:1.116 php-src/ext/date/php_date.c:1.117 --- php-src/ext/date/php_date.c:1.116 Sun Sep 10 16:32:30 2006 +++ php-src/ext/date/php_date.c Sun Sep 10 17:01:10 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c,v 1.116 2006/09/10 16:32:30 bjori Exp $ */ +/* $Id: php_date.c,v 1.117 2006/09/10 17:01:10 bjori Exp $ */ #include "php.h" #include "php_streams.h" @@ -1780,6 +1780,8 @@ timelib_time_dtor(now); } +/* {{{ proto DateTime date_create([string time[, DateTimeZone object]]) +*/ PHP_FUNCTION(date_create) { zval *timezone_object = NULL; @@ -1793,7 +1795,10 @@ 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; @@ -1806,7 +1811,10 @@ php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } } +/* }}} */ +/* {{{ proto array date_parse(string date) +*/ PHP_FUNCTION(date_parse) { char *date; @@ -1903,6 +1911,8 @@ } /* }}} */ +/* {{{ proto string date_format(DateTime object, string format) +*/ PHP_FUNCTION(date_format) { zval *object; @@ -1942,7 +1952,10 @@ RETURN_STRINGL(str, length, 0); } } +/* }}} */ +/* {{{ proto void date_modify(DateTime object, string modify) +*/ PHP_FUNCTION(date_modify) { zval *object; @@ -1973,7 +1986,10 @@ 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; @@ -1993,7 +2009,10 @@ RETURN_FALSE; } } +/* }}} */ +/* {{{ proto void date_timezone_set(DateTime object, DateTimeZone object) +*/ PHP_FUNCTION(date_timezone_set) { zval *object; @@ -2013,7 +2032,10 @@ 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; @@ -2034,7 +2056,10 @@ RETURN_LONG(0); } } +/* }}} */ +/* {{{ proto void date_time_set(DateTime object, long hour, long minute[, long second]) +*/ PHP_FUNCTION(date_time_set) { zval *object; @@ -2051,7 +2076,10 @@ 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; @@ -2068,7 +2096,10 @@ 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; @@ -2088,7 +2119,7 @@ timelib_update_ts(dateobj->time, NULL); } - +/* }}} */ static int timezone_initialize(timelib_tzinfo **tzi, /*const*/ char *tz TSRMLS_DC) { @@ -2110,6 +2141,8 @@ } } +/* {{{ proto DateTimeZone timezone_open(string timezone) +*/ PHP_FUNCTION(timezone_open) { char *tz; @@ -2124,7 +2157,10 @@ } ((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; @@ -2139,7 +2175,10 @@ } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } +/* }}} */ +/* {{{ proto string timezone_name_get(DateTimeZone object) +*/ PHP_FUNCTION(timezone_name_get) { zval *object; @@ -2153,7 +2192,10 @@ 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; @@ -2173,7 +2215,10 @@ RETURN_FALSE; } } +/* }}} */ +/* {{{ proto long timezone_offset_get(DateTimeZone object, DateTime object) +*/ PHP_FUNCTION(timezone_offset_get) { zval *object, *dateobject; @@ -2193,7 +2238,10 @@ RETVAL_LONG(offset->offset); timelib_time_offset_dtor(offset); } +/* }}} */ +/* {{{ proto array timezone_transitions_get(DateTimeZone object) +*/ PHP_FUNCTION(timezone_transitions_get) { zval *object, *element; @@ -2219,7 +2267,10 @@ add_next_index_zval(return_value, element); } } +/* }}} */ +/* {{{ proto array timezone_identifiers_list() +*/ PHP_FUNCTION(timezone_identifiers_list) { const timelib_tzdb *tzdb; @@ -2236,7 +2287,10 @@ 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; @@ -2268,7 +2322,7 @@ 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 */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php