cvs: pecl /intl config.m4 /intl/dateformat dateformat.c dateformat.h dateformat_attr.c dateformat_class.c dateformat_class.h dateformat_format.c
dateformat_parse.c /intl/tests dateformat_format.phpt dateformat_format_parse.phpt dateformat_get_datetype.phpt dateformat_get_locale.phpt
dateformat_get_set_calendar.phpt dateformat_get_set_pattern.phpt dateformat_get_timetype.phpt dateformat_get_timezone_id.phpt
dateformat_is_set_lenient.phpt dateformat_localtime.phpt dateformat_parse.phpt dateformat_parse_localtime_parsepos.phpt
dateformat_parse_timestamp_parsepos.phpt dateformat_set_timezone_id.phpt
| From: | Stanislav Malyshev | Date: | Mon, 05 May 2008 23:46:20 +0000 |
| Subject: | cvs: pecl /intl config.m4 /intl/dateformat dateformat.c dateformat.h dateformat_attr.c dateformat_class.c dateformat_class.h dateformat_format.c dateformat_parse.c /intl/tests dateformat_format.phpt dateformat_format_parse.phpt dateformat_get_datetype.phpt dateformat_get_locale.phpt dateformat_get_set_calendar.phpt dateformat_get_set_pattern.phpt dateformat_get_timetype.phpt dateformat_get_timezone_id.phpt dateformat_is_set_lenient.phpt dateformat_localtime.phpt dateformat_parse.phpt dateformat_parse_localtime_parsepos.phpt dateformat_parse_timestamp_parsepos.phpt dateformat_set_timezone_id.phpt |
||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-10701@lists.php.net to get a copy of this message | ||
stas Mon May 5 23:46:20 2008 UTC
Modified files:
/pecl/intl config.m4
/pecl/intl/dateformat dateformat.c dateformat.h dateformat_attr.c
dateformat_class.c dateformat_class.h
dateformat_format.c dateformat_parse.c
/pecl/intl/tests dateformat_format.phpt
dateformat_format_parse.phpt
dateformat_get_datetype.phpt
dateformat_get_locale.phpt
dateformat_get_set_calendar.phpt
dateformat_get_set_pattern.phpt
dateformat_get_timetype.phpt
dateformat_get_timezone_id.phpt
dateformat_is_set_lenient.phpt
dateformat_localtime.phpt dateformat_parse.phpt
dateformat_parse_localtime_parsepos.phpt
dateformat_parse_timestamp_parsepos.phpt
dateformat_set_timezone_id.phpt
Log:
DateFormatter -> IntlDateFormatter
http://cvs.php.net/viewvc.cgi/pecl/intl/config.m4?r1=1.8&r2=1.9&diff_format=u Index: pecl/intl/config.m4 diff -u pecl/intl/config.m4:1.8 pecl/intl/config.m4:1.9 --- pecl/intl/config.m4:1.8 Fri Apr 4 16:56:45 2008 +++ pecl/intl/config.m4 Mon May 5 23:46:20 2008 @@ -1,58 +1,58 @@ -dnl config.m4 for extension intl - -dnl ########################################################################## -dnl Initialize the extension -PHP_ARG_ENABLE(intl, whether to enable internationalization support, -[ --enable-intl Enable internationalization support]) - -if test "$PHP_INTL" != "no"; then - PHP_SETUP_ICU - PHP_REQUIRE_CXX() - - PHP_NEW_EXTENSION(intl, - php_intl.c \ - intl_error.c \ - intl_convert.c \ - collator/collator.c \ - collator/collator_class.c \ - collator/collator_sort.c \ - collator/collator_convert.c \ - collator/collator_locale.c \ - collator/collator_compare.c \ - collator/collator_attr.c \ - collator/collator_create.c \ - collator/collator_is_numeric.c \ - collator/collator_error.c \ - common/common_error.c \ - formatter/formatter.c \ - formatter/formatter_main.c \ - formatter/formatter_class.c \ - formatter/formatter_attr.c \ - formatter/formatter_data.c \ - formatter/formatter_format.c \ - formatter/formatter_parse.c \ - normalizer/normalizer.c \ - normalizer/normalizer_class.c \ - normalizer/normalizer_normalize.c \ - locale/locale.c \ - locale/locale_class.c \ - locale/locale_methods.c \ - msgformat/msgformat.c \ - msgformat/msgformat_attr.c \ - msgformat/msgformat_class.c \ - msgformat/msgformat_data.c \ - msgformat/msgformat_format.c \ - msgformat/msgformat_helpers.cpp \ - msgformat/msgformat_parse.c \ - grapheme/grapheme_string.c \ - grapheme/grapheme_util.c \ - ,$ext_shared,,$ICU_INCS) - - PHP_ADD_BUILD_DIR($ext_builddir/collator) - PHP_ADD_BUILD_DIR($ext_builddir/common) - PHP_ADD_BUILD_DIR($ext_builddir/formatter) - PHP_ADD_BUILD_DIR($ext_builddir/normalizer) - PHP_ADD_BUILD_DIR($ext_builddir/locale) - PHP_ADD_BUILD_DIR($ext_builddir/msgformat) - PHP_ADD_BUILD_DIR($ext_builddir/grapheme) -fi +dnl config.m4 for extension intl + +dnl ########################################################################## +dnl Initialize the extension +PHP_ARG_ENABLE(intl, whether to enable internationalization support, +[ --enable-intl Enable internationalization support]) + +if test "$PHP_INTL" != "no"; then + PHP_SETUP_ICU + PHP_REQUIRE_CXX() + + PHP_NEW_EXTENSION(intl, + php_intl.c \ + intl_error.c \ + intl_convert.c \ + collator/collator.c \ + collator/collator_class.c \ + collator/collator_sort.c \ + collator/collator_convert.c \ + collator/collator_locale.c \ + collator/collator_compare.c \ + collator/collator_attr.c \ + collator/collator_create.c \ + collator/collator_is_numeric.c \ + collator/collator_error.c \ + common/common_error.c \ + formatter/formatter.c \ + formatter/formatter_main.c \ + formatter/formatter_class.c \ + formatter/formatter_attr.c \ + formatter/formatter_data.c \ + formatter/formatter_format.c \ + formatter/formatter_parse.c \ + normalizer/normalizer.c \ + normalizer/normalizer_class.c \ + normalizer/normalizer_normalize.c \ + locale/locale.c \ + locale/locale_class.c \ + locale/locale_methods.c \ + msgformat/msgformat.c \ + msgformat/msgformat_attr.c \ + msgformat/msgformat_class.c \ + msgformat/msgformat_data.c \ + msgformat/msgformat_format.c \ + msgformat/msgformat_helpers.cpp \ + msgformat/msgformat_parse.c \ + grapheme/grapheme_string.c \ + grapheme/grapheme_util.c \ + ,$ext_shared,,$ICU_INCS) + + PHP_ADD_BUILD_DIR($ext_builddir/collator) + PHP_ADD_BUILD_DIR($ext_builddir/common) + PHP_ADD_BUILD_DIR($ext_builddir/formatter) + PHP_ADD_BUILD_DIR($ext_builddir/normalizer) + PHP_ADD_BUILD_DIR($ext_builddir/locale) + PHP_ADD_BUILD_DIR($ext_builddir/msgformat) + PHP_ADD_BUILD_DIR($ext_builddir/grapheme) +fi http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat.c?r1=1.5&r2=1.6&diff_format=u Index: pecl/intl/dateformat/dateformat.c diff -u pecl/intl/dateformat/dateformat.c:1.5 pecl/intl/dateformat/dateformat.c:1.6 --- pecl/intl/dateformat/dateformat.c:1.5 Mon Apr 14 22:16:17 2008 +++ pecl/intl/dateformat/dateformat.c Mon May 5 23:46:20 2008 @@ -32,16 +32,16 @@ */ void dateformat_register_constants( INIT_FUNC_ARGS ) { - if( DateFormatter_ce_ptr == NULL) { + if( IntlDateFormatter_ce_ptr == NULL) { zend_error(E_ERROR, "DateFormat class not defined"); return; } #define DATEFORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS) - #define DATEFORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( DateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UDAT_##x TSRMLS_CC ); - #define DATEFORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( DateFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC ); + #define DATEFORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UDAT_##x TSRMLS_CC ); + #define DATEFORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC ); - #define DATEFORMATTER_EXPOSE_UCAL_CLASS_CONST(x) zend_declare_class_constant_long( DateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UCAL_##x TSRMLS_CC ); + #define DATEFORMATTER_EXPOSE_UCAL_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UCAL_##x TSRMLS_CC ); // UDateFormatStyle constants DATEFORMATTER_EXPOSE_CLASS_CONST( FULL ); @@ -67,9 +67,9 @@ } /* }}} */ -/* {{{ proto DateFormatter DateFormatter::create( string $locale , long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) +/* {{{ proto IntlDateFormatter IntlDateFormatter::create( string $locale , long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) * Create formatter. }}} */ -/* {{{ proto DateFormatter datefmt_create( string $locale, long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) +/* {{{ proto IntlDateFormatter datefmt_create( string $locale, long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) * Create formatter. */ @@ -96,7 +96,7 @@ UCalendar ucal_obj = NULL; - DateFormatter_object* mfo; + IntlDateFormatter_object* mfo; intl_error_reset( NULL TSRMLS_CC ); @@ -110,12 +110,12 @@ } - // Create a DateFormatter object and save the ICU formatter into it. + // Create a IntlDateFormatter object and save the ICU formatter into it. if( ( object = getThis() ) == NULL ) object = return_value; if( Z_TYPE_P( object ) != IS_OBJECT ) - object_init_ex( object, DateFormatter_ce_ptr ); + object_init_ex( object, IntlDateFormatter_ce_ptr ); DATE_FORMAT_METHOD_FETCH_OBJECT; @@ -188,10 +188,10 @@ } /* }}} */ -/* {{{ proto void DateFormatter::__construct( string $locale, string $pattern ) - * DateFormatter object constructor. +/* {{{ proto void IntlDateFormatter::__construct( string $locale, string $pattern ) + * IntlDateFormatter object constructor. */ -PHP_METHOD( DateFormatter, __construct ) +PHP_METHOD( IntlDateFormatter, __construct ) { char* locale = NULL; int locale_len = 0; @@ -212,7 +212,7 @@ int all_done = 0; zval* object; - DateFormatter_object* mfo; + IntlDateFormatter_object* mfo; intl_error_reset( NULL TSRMLS_CC ); @@ -240,7 +240,7 @@ } */ - mfo = (DateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); + mfo = (IntlDateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); intl_error_reset( &mfo->datef_data.error TSRMLS_CC ); @@ -306,19 +306,19 @@ } /* }}} */ -/* {{{ proto int DateFormatter::getErrorCode() +/* {{{ proto int IntlDateFormatter::getErrorCode() * Get formatter's last error code. }}} */ -/* {{{ proto int datefmt_get_error_code( DateFormatter $nf ) +/* {{{ proto int datefmt_get_error_code( IntlDateFormatter $nf ) * Get formatter's last error code. */ PHP_FUNCTION( datefmt_get_error_code ) { zval* object = NULL; - DateFormatter_object* mfo = NULL; + IntlDateFormatter_object* mfo = NULL; // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", - &object, DateFormatter_ce_ptr ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_error_code: unable to parse input params", 0 TSRMLS_CC ); @@ -326,27 +326,27 @@ RETURN_FALSE; } - mfo = (DateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); + mfo = (IntlDateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); // Return formatter's last error code. RETURN_LONG( INTL_DATA_ERROR_CODE(mfo) ); } /* }}} */ -/* {{{ proto string DateFormatter::getErrorMessage( ) +/* {{{ proto string IntlDateFormatter::getErrorMessage( ) * Get text description for formatter's last error code. }}} */ -/* {{{ proto string datefmt_get_error_message( DateFormatter $coll ) +/* {{{ proto string datefmt_get_error_message( IntlDateFormatter $coll ) * Get text description for formatter's last error code. */ PHP_FUNCTION( datefmt_get_error_message ) { char* message = NULL; zval* object = NULL; - DateFormatter_object* mfo = NULL; + IntlDateFormatter_object* mfo = NULL; // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", - &object, DateFormatter_ce_ptr ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_error_message: unable to parse input params", 0 TSRMLS_CC ); @@ -354,7 +354,7 @@ RETURN_FALSE; } - mfo = (DateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); + mfo = (IntlDateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); // Return last error message. message = intl_error_get_message( &mfo->datef_data.error TSRMLS_CC ); http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat.h?r1=1.2&r2=1.3&diff_format=u Index: pecl/intl/dateformat/dateformat.h diff -u pecl/intl/dateformat/dateformat.h:1.2 pecl/intl/dateformat/dateformat.h:1.3 --- pecl/intl/dateformat/dateformat.h:1.2 Wed Mar 5 20:26:19 2008 +++ pecl/intl/dateformat/dateformat.h Mon May 5 23:46:20 2008 @@ -22,7 +22,7 @@ PHP_FUNCTION( datefmt_get_error_code ); PHP_FUNCTION( datefmt_get_error_message ); PHP_FUNCTION( datefmt_register_constants ); -PHP_METHOD( DateFormatter, __construct ); +PHP_METHOD( IntlDateFormatter, __construct ); /* These are not necessary at this point of time http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_attr.c?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/dateformat/dateformat_attr.c diff -u pecl/intl/dateformat/dateformat_attr.c:1.4 pecl/intl/dateformat/dateformat_attr.c:1.5 --- pecl/intl/dateformat/dateformat_attr.c:1.4 Fri Apr 4 17:47:30 2008 +++ pecl/intl/dateformat/dateformat_attr.c Mon May 5 23:46:20 2008 @@ -26,7 +26,7 @@ #include <unicode/udat.h> #include <unicode/ucal.h> -static void internal_set_calendar(DateFormatter_object *mfo, char* timezone_id , int timezone_id_len , int calendar ,zval* return_value TSRMLS_DC){ +static void internal_set_calendar(IntlDateFormatter_object *mfo, char* timezone_id , int timezone_id_len , int calendar ,zval* return_value TSRMLS_DC){ int timezone_utf16_len = 0; UChar* timezone_utf16 = NULL; //timezone_id in UTF-16 @@ -63,9 +63,9 @@ } -/* {{{ proto unicode DateFormatter::getDateType( ) +/* {{{ proto unicode IntlDateFormatter::getDateType( ) * Get formatter datetype. }}} */ -/* {{{ proto string datefmt_get_datetype( DateFormatter $mf ) +/* {{{ proto string datefmt_get_datetype( IntlDateFormatter $mf ) * Get formatter datetype. */ PHP_FUNCTION( datefmt_get_datetype ) @@ -73,7 +73,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_datetype: unable to parse input params", 0 TSRMLS_CC ); @@ -89,9 +89,9 @@ } /* }}} */ -/* {{{ proto unicode DateFormatter::getTimeType( ) +/* {{{ proto unicode IntlDateFormatter::getTimeType( ) * Get formatter timetype. }}} */ -/* {{{ proto string datefmt_get_timetype( DateFormatter $mf ) +/* {{{ proto string datefmt_get_timetype( IntlDateFormatter $mf ) * Get formatter timetype. */ PHP_FUNCTION( datefmt_get_timetype ) @@ -99,7 +99,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timetype: unable to parse input params", 0 TSRMLS_CC ); @@ -116,9 +116,9 @@ /* }}} */ -/* {{{ proto unicode DateFormatter::getCalendar( ) +/* {{{ proto unicode IntlDateFormatter::getCalendar( ) * Get formatter calendar. }}} */ -/* {{{ proto string datefmt_get_calendar( DateFormatter $mf ) +/* {{{ proto string datefmt_get_calendar( IntlDateFormatter $mf ) * Get formatter calendar. */ PHP_FUNCTION( datefmt_get_calendar ) @@ -126,7 +126,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_calendar: unable to parse input params", 0 TSRMLS_CC ); @@ -142,9 +142,9 @@ } /* }}} */ -/* {{{ proto unicode DateFormatter::getTimeZoneId( ) +/* {{{ proto unicode IntlDateFormatter::getTimeZoneId( ) * Get formatter timezone_id. }}} */ -/* {{{ proto string datefmt_get_timezone_id( DateFormatter $mf ) +/* {{{ proto string datefmt_get_timezone_id( IntlDateFormatter $mf ) * Get formatter timezone_id. */ PHP_FUNCTION( datefmt_get_timezone_id ) @@ -152,7 +152,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timezone_id: unable to parse input params", 0 TSRMLS_CC ); @@ -171,9 +171,9 @@ } } -/* {{{ proto boolean DateFormatter::setTimeZoneId( $timezone_id) +/* {{{ proto boolean IntlDateFormatter::setTimeZoneId( $timezone_id) * Set formatter timezone_id. }}} */ -/* {{{ proto boolean datefmt_set_timezone_id( DateFormatter $mf ,$timezone_id) +/* {{{ proto boolean datefmt_set_timezone_id( IntlDateFormatter $mf ,$timezone_id) * Set formatter timezone_id. */ PHP_FUNCTION( datefmt_set_timezone_id ) @@ -184,7 +184,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, DateFormatter_ce_ptr ,&timezone_id , &timezone_id_len) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, IntlDateFormatter_ce_ptr ,&timezone_id , &timezone_id_len) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_timezone_id: unable to parse input params", 0 TSRMLS_CC ); @@ -197,7 +197,7 @@ //set the timezone for the calendar internal_set_calendar( mfo , timezone_id , timezone_id_len , mfo->calendar ,return_value TSRMLS_CC ); - //Set the DateFormatter variable + //Set the IntlDateFormatter variable if( mfo->timezone_id ){ efree(mfo->timezone_id); } @@ -206,9 +206,9 @@ RETURN_TRUE; } -/* {{{ proto string DateFormatter::getPattern( ) +/* {{{ proto string IntlDateFormatter::getPattern( ) * Get formatter pattern. }}} */ -/* {{{ proto string datefmt_get_pattern( DateFormatter $mf ) +/* {{{ proto string datefmt_get_pattern( IntlDateFormatter $mf ) * Get formatter pattern. */ PHP_FUNCTION( datefmt_get_pattern ) @@ -221,7 +221,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_pattern: unable to parse input params", 0 TSRMLS_CC ); @@ -248,9 +248,9 @@ } /* }}} */ -/* {{{ proto bool DateFormatter::setPattern( string $pattern ) +/* {{{ proto bool IntlDateFormatter::setPattern( string $pattern ) * Set formatter pattern. }}} */ -/* {{{ proto bool datefmt_set_pattern( DateFormatter $mf, string $pattern ) +/* {{{ proto bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern ) * Set formatter pattern. */ PHP_FUNCTION( datefmt_set_pattern ) @@ -266,7 +266,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", - &object, DateFormatter_ce_ptr, &value, &value_len ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr, &value, &value_len ) == FAILURE ) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_pattern: unable to parse input params", 0 TSRMLS_CC); @@ -288,9 +288,9 @@ } /* }}} */ -/* {{{ proto string DateFormatter::getLocale() +/* {{{ proto string IntlDateFormatter::getLocale() * Get formatter locale. }}} */ -/* {{{ proto string datefmt_get_locale(DateFormatter $mf) +/* {{{ proto string datefmt_get_locale(IntlDateFormatter $mf) * Get formatter locale. */ PHP_FUNCTION( datefmt_get_locale ) @@ -302,7 +302,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", - &object, DateFormatter_ce_ptr ,&loc_type) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ,&loc_type) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_locale: unable to parse input params", 0 TSRMLS_CC ); @@ -318,9 +318,9 @@ } /* }}} */ -/* {{{ proto string DateFormatter::isLenient() +/* {{{ proto string IntlDateFormatter::isLenient() * Get formatter isLenient. }}} */ -/* {{{ proto string datefmt_isLenient(DateFormatter $mf) +/* {{{ proto string datefmt_isLenient(IntlDateFormatter $mf) * Get formatter locale. */ PHP_FUNCTION( datefmt_is_lenient ) @@ -330,7 +330,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", - &object, DateFormatter_ce_ptr ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_is_lenient: unable to parse input params", 0 TSRMLS_CC ); @@ -345,9 +345,9 @@ } /* }}} */ -/* {{{ proto string DateFormatter::setLenient() +/* {{{ proto string IntlDateFormatter::setLenient() * Set formatter lenient. }}} */ -/* {{{ proto string datefmt_setLenient(DateFormatter $mf) +/* {{{ proto string datefmt_setLenient(IntlDateFormatter $mf) * Set formatter lenient. */ PHP_FUNCTION( datefmt_set_lenient ) @@ -359,7 +359,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ob", - &object, DateFormatter_ce_ptr ,&isLenient ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ,&isLenient ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_lenient: unable to parse input params", 0 TSRMLS_CC ); @@ -374,9 +374,9 @@ } /* }}} */ -/* {{{ proto bool DateFormatter::setPattern( int $calendar ) +/* {{{ proto bool IntlDateFormatter::setPattern( int $calendar ) * Set formatter calendar. }}} */ -/* {{{ proto bool datefmt_set_calendar( DateFormatter $mf, int $calendar ) +/* {{{ proto bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar ) * Set formatter calendar. */ PHP_FUNCTION( datefmt_set_calendar ) @@ -387,7 +387,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", - &object, DateFormatter_ce_ptr, &calendar ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr, &calendar ) == FAILURE ) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_calendar: unable to parse input params", 0 TSRMLS_CC); @@ -406,7 +406,7 @@ internal_set_calendar( mfo , mfo->timezone_id , strlen(mfo->timezone_id) , calendar ,return_value TSRMLS_CC ); - //Set the calendar value in the DateFormatter object + //Set the calendar value in the IntlDateFormatter object mfo->calendar = calendar ; RETURN_TRUE; http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_class.c?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/dateformat/dateformat_class.c diff -u pecl/intl/dateformat/dateformat_class.c:1.3 pecl/intl/dateformat/dateformat_class.c:1.4 --- pecl/intl/dateformat/dateformat_class.c:1.3 Thu Mar 6 20:36:21 2008 +++ pecl/intl/dateformat/dateformat_class.c Mon May 5 23:46:20 2008 @@ -23,23 +23,23 @@ #include "dateformat.h" #include "dateformat_attr.h" -zend_class_entry *DateFormatter_ce_ptr = NULL; +zend_class_entry *IntlDateFormatter_ce_ptr = NULL; ///////////////////////////////////////////////////////////////////////////// -// Auxiliary functions needed by objects of 'DateFormatter' class +// Auxiliary functions needed by objects of 'IntlDateFormatter' class ///////////////////////////////////////////////////////////////////////////// -/* {{{ DateFormatter_objects_dtor */ -static void DateFormatter_object_dtor(void *object, zend_object_handle handle TSRMLS_DC ) +/* {{{ IntlDateFormatter_objects_dtor */ +static void IntlDateFormatter_object_dtor(void *object, zend_object_handle handle TSRMLS_DC ) { zend_objects_destroy_object( object, handle TSRMLS_CC ); } /* }}} */ -/* {{{ DateFormatter_objects_free */ -void DateFormatter_object_free( zend_object *object TSRMLS_DC ) +/* {{{ IntlDateFormatter_objects_free */ +void IntlDateFormatter_object_free( zend_object *object TSRMLS_DC ) { - DateFormatter_object* mfo = (DateFormatter_object*)object; + IntlDateFormatter_object* mfo = (IntlDateFormatter_object*)object; zend_object_std_dtor( &mfo->zo TSRMLS_CC ); @@ -53,13 +53,13 @@ } /* }}} */ -/* {{{ DateFormatter_object_create */ -zend_object_value DateFormatter_object_create(zend_class_entry *ce TSRMLS_DC) +/* {{{ IntlDateFormatter_object_create */ +zend_object_value IntlDateFormatter_object_create(zend_class_entry *ce TSRMLS_DC) { zend_object_value retval; - DateFormatter_object* intern; + IntlDateFormatter_object* intern; - intern = ecalloc( 1, sizeof(DateFormatter_object) ); + intern = ecalloc( 1, sizeof(IntlDateFormatter_object) ); dateformat_data_init( &intern->datef_data TSRMLS_CC ); zend_object_std_init( &intern->zo, ce TSRMLS_CC ); intern->date_type = 0; @@ -69,8 +69,8 @@ retval.handle = zend_objects_store_put( intern, - DateFormatter_object_dtor, - (zend_objects_free_object_storage_t)DateFormatter_object_free, + IntlDateFormatter_object_dtor, + (zend_objects_free_object_storage_t)IntlDateFormatter_object_free, NULL TSRMLS_CC ); retval.handlers = zend_get_std_object_handlers(); @@ -80,15 +80,15 @@ /* }}} */ ///////////////////////////////////////////////////////////////////////////// -// 'DateFormatter' class registration structures & functions +// 'IntlDateFormatter' class registration structures & functions ///////////////////////////////////////////////////////////////////////////// -/* {{{ DateFormatter_class_functions - * Every 'DateFormatter' class method has an entry in this table +/* {{{ IntlDateFormatter_class_functions + * Every 'IntlDateFormatter' class method has an entry in this table */ -static function_entry DateFormatter_class_functions[] = { - PHP_ME( DateFormatter, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) +static function_entry IntlDateFormatter_class_functions[] = { + PHP_ME( IntlDateFormatter, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) ZEND_FENTRY( create, ZEND_FN( datefmt_create ), NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), NULL ) PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), NULL ) @@ -111,21 +111,21 @@ /* }}} */ /* {{{ dateformat_register_class - * Initialize 'DateFormatter' class + * Initialize 'IntlDateFormatter' class */ -void dateformat_register_DateFormatter_class( TSRMLS_D ) +void dateformat_register_IntlDateFormatter_class( TSRMLS_D ) { zend_class_entry ce; - // Create and register 'DateFormatter' class. - INIT_CLASS_ENTRY( ce, "DateFormatter", DateFormatter_class_functions ); - ce.create_object = DateFormatter_object_create; - DateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC ); + // Create and register 'IntlDateFormatter' class. + INIT_CLASS_ENTRY( ce, "IntlDateFormatter", IntlDateFormatter_class_functions ); + ce.create_object = IntlDateFormatter_object_create; + IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC ); - // Declare 'DateFormatter' class properties. - if( !DateFormatter_ce_ptr ) + // Declare 'IntlDateFormatter' class properties. + if( !IntlDateFormatter_ce_ptr ) { - zend_error(E_ERROR, "Failed to register DateFormatter class"); + zend_error(E_ERROR, "Failed to register IntlDateFormatter class"); return; } } http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_class.h?r1=1.2&r2=1.3&diff_format=u Index: pecl/intl/dateformat/dateformat_class.h diff -u pecl/intl/dateformat/dateformat_class.h:1.2 pecl/intl/dateformat/dateformat_class.h:1.3 --- pecl/intl/dateformat/dateformat_class.h:1.2 Wed Mar 5 20:26:19 2008 +++ pecl/intl/dateformat/dateformat_class.h Mon May 5 23:46:20 2008 @@ -30,15 +30,15 @@ int time_type ; int calendar ; char* timezone_id; -} DateFormatter_object; +} IntlDateFormatter_object; -void dateformat_register_DateFormatter_class( TSRMLS_D ); -extern zend_class_entry *DateFormatter_ce_ptr; +void dateformat_register_IntlDateFormatter_class( TSRMLS_D ); +extern zend_class_entry *IntlDateFormatter_ce_ptr; /* Auxiliary macros */ -#define DATE_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(DateFormatter, mfo) -#define DATE_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(DateFormatter, mfo) +#define DATE_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(IntlDateFormatter, mfo) +#define DATE_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(IntlDateFormatter, mfo) #define DATE_FORMAT_OBJECT(mfo) (mfo)->datef_data.udatf #endif // #ifndef DATE_FORMAT_CLASS_H http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_format.c?r1=1.6&r2=1.7&diff_format=u Index: pecl/intl/dateformat/dateformat_format.c diff -u pecl/intl/dateformat/dateformat_format.c:1.6 pecl/intl/dateformat/dateformat_format.c:1.7 --- pecl/intl/dateformat/dateformat_format.c:1.6 Thu Apr 3 20:58:15 2008 +++ pecl/intl/dateformat/dateformat_format.c Mon May 5 23:46:20 2008 @@ -31,7 +31,7 @@ /* {{{ * Internal function which calls the udat_format */ -static void internal_format(DateFormatter_object *mfo, UDate timestamp , zval *return_value TSRMLS_DC){ +static void internal_format(IntlDateFormatter_object *mfo, UDate timestamp , zval *return_value TSRMLS_DC){ UChar* formatted = NULL; int32_t resultlengthneeded =0 ; @@ -57,7 +57,7 @@ /* {{{ * Internal function which fetches an element from the passed array for the key_name passed */ -static double internal_get_arr_ele(DateFormatter_object *mfo , HashTable* hash_arr ,char* key_name TSRMLS_DC){ +static double internal_get_arr_ele(IntlDateFormatter_object *mfo , HashTable* hash_arr ,char* key_name TSRMLS_DC){ zval** ele_value = NULL; UDate result = -1; @@ -77,7 +77,7 @@ /* {{{ * Internal function which creates a UCalendar from the passed array */ -static void internal_create_ucal(DateFormatter_object *mfo, HashTable* hash_arr , UCalendar* pcal TSRMLS_DC){ +static void internal_create_ucal(IntlDateFormatter_object *mfo, HashTable* hash_arr , UCalendar* pcal TSRMLS_DC){ long year =0; long month =0; long hour =0; @@ -115,7 +115,7 @@ } -/* {{{ proto string DateFormatter::format( [mixed]int $args or array $args ) +/* {{{ proto string IntlDateFormatter::format( [mixed]int $args or array $args ) * Format the time value as a string. }}}*/ /* {{{ proto string datefmt_format( [mixed]int $args or array $args ) * Format the time value as a string. }}}*/ @@ -130,7 +130,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz", &object, DateFormatter_ce_ptr ,&zarg ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz", &object, IntlDateFormatter_ce_ptr ,&zarg ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: unable to parse input params", 0 TSRMLS_CC ); http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_parse.c?r1=1.9&r2=1.10&diff_format=u Index: pecl/intl/dateformat/dateformat_parse.c diff -u pecl/intl/dateformat/dateformat_parse.c:1.9 pecl/intl/dateformat/dateformat_parse.c:1.10 --- pecl/intl/dateformat/dateformat_parse.c:1.9 Tue Apr 8 17:17:37 2008 +++ pecl/intl/dateformat/dateformat_parse.c Mon May 5 23:46:20 2008 @@ -33,7 +33,7 @@ * if set to 1 - store any error encountered in the parameter parse_error * if set to 0 - no need to store any error encountered in the parameter parse_error */ -static void internal_parse_to_timestamp(DateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ +static void internal_parse_to_timestamp(IntlDateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ long result = 0; UDate timestamp =0; UChar* text_utf16 = NULL; @@ -60,7 +60,7 @@ } /* }}} */ -static void add_to_localtime_arr( DateFormatter_object *mfo, zval* return_value ,UCalendar parsed_calendar , long calendar_field , char* key_name TSRMLS_DC){ +static void add_to_localtime_arr( IntlDateFormatter_object *mfo, zval* return_value ,UCalendar parsed_calendar , long calendar_field , char* key_name TSRMLS_DC){ long calendar_field_val = ucal_get( parsed_calendar , calendar_field , &INTL_DATA_ERROR_CODE(mfo)); INTL_METHOD_CHECK_STATUS( mfo, "Date parsing - localtime failed : could not get a field from calendar" ); @@ -78,7 +78,7 @@ /* {{{ * Internal function which calls the udat_parseCalendar */ -static void internal_parse_to_localtime(DateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ +static void internal_parse_to_localtime(IntlDateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ UCalendar* parsed_calendar = NULL ; UChar* text_utf16 = NULL; int32_t text_utf16_len = 0; @@ -116,9 +116,9 @@ /* }}} */ -/* {{{ proto integer DateFormatter::parse( string $text_to_parse , int $parse_pos ) +/* {{{ proto integer IntlDateFormatter::parse( string $text_to_parse , int $parse_pos ) * Parse the string $value starting at parse_pos to a Unix timestamp -int }}}*/ -/* {{{ proto integer datefmt_parse( DateFormatter $fmt, string $text_to_parse , int $parse_pos ) +/* {{{ proto integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse , int $parse_pos ) * Parse the string $value starting at parse_pos to a Unix timestamp -int }}}*/ PHP_FUNCTION(datefmt_parse) { @@ -131,7 +131,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", - &object, DateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ + &object, IntlDateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; @@ -147,9 +147,9 @@ } /* }}} */ -/* {{{ proto integer DateFormatter::localtime( string $text_to_parse, int $parse_pos )) +/* {{{ proto integer IntlDateFormatter::localtime( string $text_to_parse, int $parse_pos )) * Parse the string $value to a localtime array }}}*/ -/* {{{ proto integer datefmt_localtime( DateFormatter $fmt, string $text_to_parse, int $parse_pos )) +/* {{{ proto integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse, int $parse_pos )) * Parse the string $value to a localtime array }}}*/ PHP_FUNCTION(datefmt_localtime) { @@ -162,7 +162,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osl", - &object, DateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ + &object, IntlDateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse_to_localtime: unable to parse input params", 0 TSRMLS_CC ); http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_format.phpt?r1=1.6&r2=1.7&diff_format=u Index: pecl/intl/tests/dateformat_format.phpt diff -u pecl/intl/tests/dateformat_format.phpt:1.6 pecl/intl/tests/dateformat_format.phpt:1.7 --- pecl/intl/tests/dateformat_format.phpt:1.6 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_format.phpt Mon May 5 23:46:20 2008 @@ -18,11 +18,11 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; @@ -87,9 +87,9 @@ foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - //$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', DateFormatter::GREGORIAN ,"dd/mm/yyyy"); - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + //$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ,"dd/mm/yyyy"); + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); //$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry); $formatted = ut_datefmt_format( $fmt , $timestamp_entry); $res_str .= "\nFormatted timestamp is : $formatted"; @@ -109,7 +109,7 @@ foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry); $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); if( intl_get_error_code() == U_ZERO_ERROR){ @@ -136,163 +136,163 @@ Input timestamp is : 0 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 4:00:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 4:00:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 4:00 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 04:00 PM ------------ Input timestamp is : -1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 17, 1969 6:40:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 17, 1969 6:40:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/17/69 6:40 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691217 06:40 PM ------------ Input timestamp is : 1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : January 14, 1970 1:20:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Jan 14, 1970 1:20:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 1/14/70 1:20 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19700114 01:20 PM ------------ Input timestamp is : 2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Sunday, September 18, 2039 4:06:40 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : September 18, 2039 4:06:40 PM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Sep 18, 2039 4:06:40 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 9/18/39 4:06 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 20390918 04:06 PM ------------ Input timestamp is : -2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Saturday, April 14, 1900 5:53:20 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : April 14, 1900 5:53:20 PM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Apr 14, 1900 5:53:20 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 4/14/00 5:53 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19000414 05:53 PM ------------ Input timestamp is : 90099999 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : November 8, 1972 11:46:39 AM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Nov 8, 1972 11:46:39 AM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 11/8/72 11:46 AM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19721108 11:46 AM ------------ Input timestamp is : 3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 5:00:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 5:00:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 5:00 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 05:00 PM ------------ Input timestamp is : -3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 3:00:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 3:00:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 3:00 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 03:00 PM ------------ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , tm_wday : '0' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2005 7:03:24 PM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005 7:03:24 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/05 7:03 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 20050403 07:03 PM ------------ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '205' , tm_wday : '5' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Friday, April 3, 2105 3:03:24 AM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2105 3:03:24 AM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2105 3:03:24 AM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/05 3:03 AM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 21050403 03:03 AM ------------ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '-5' , tm_wday : '3' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Wednesday, April 3, 1895 3:03:24 AM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 1895 3:03:24 AM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 1895 3:03:24 AM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/95 3:03 AM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 18950403 03:03 AM http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_format_parse.phpt?r1=1.2&r2=1.3&diff_format=u Index: pecl/intl/tests/dateformat_format_parse.phpt diff -u pecl/intl/tests/dateformat_format_parse.phpt:1.2 pecl/intl/tests/dateformat_format_parse.phpt:1.3 --- pecl/intl/tests/dateformat_format_parse.phpt:1.2 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_format_parse.phpt Mon May 5 23:46:20 2008 @@ -18,9 +18,9 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM ); $res_str = ''; @@ -84,8 +84,8 @@ $res_str .= "\n------------\n"; foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $formatted = ut_datefmt_format( $fmt , $timestamp_entry); $res_str .= "\nFormatted timestamp is : $formatted"; $parsed = ut_datefmt_parse( $fmt , $formatted); @@ -109,7 +109,7 @@ $res_str .= "\n------------\n"; foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry); $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); if( intl_get_error_code() == U_ZERO_ERROR){ @@ -151,13 +151,13 @@ Input timestamp is : 0 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT Parsed timestamp is : 0 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 4:00:00 PM PST Parsed timestamp is : 0 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 4:00:00 PM Parsed timestamp is : 0 ------------ @@ -165,13 +165,13 @@ Input timestamp is : -1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT Parsed timestamp is : -1200000 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 17, 1969 6:40:00 PM PST Parsed timestamp is : -1200000 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 17, 1969 6:40:00 PM Parsed timestamp is : -1200000 ------------ @@ -179,13 +179,13 @@ Input timestamp is : 1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT Parsed timestamp is : 1200000 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : January 14, 1970 1:20:00 PM PST Parsed timestamp is : 1200000 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Jan 14, 1970 1:20:00 PM Parsed timestamp is : 1200000 ------------ @@ -193,15 +193,15 @@ Input timestamp is : 2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Sunday, September 18, 2039 4:06:40 PM PT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : September 18, 2039 4:06:40 PM PDT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Sep 18, 2039 4:06:40 PM Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' @@ -210,15 +210,15 @@ Input timestamp is : -2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Saturday, April 14, 1900 5:53:20 PM PT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : April 14, 1900 5:53:20 PM PDT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Apr 14, 1900 5:53:20 PM Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' @@ -227,13 +227,13 @@ Input timestamp is : 90099999 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT Parsed timestamp is : 90099999 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : November 8, 1972 11:46:39 AM PST Parsed timestamp is : 90099999 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Nov 8, 1972 11:46:39 AM Parsed timestamp is : 90099999 ------------ @@ -241,13 +241,13 @@ Input timestamp is : 3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT Parsed timestamp is : 3600 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 5:00:00 PM PST Parsed timestamp is : 3600 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 5:00:00 PM Parsed timestamp is : 3600 ------------ @@ -255,13 +255,13 @@ Input timestamp is : -3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT Parsed timestamp is : -3600 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 3:00:00 PM PST Parsed timestamp is : -3600 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 3:00:00 PM Parsed timestamp is : -3600 ------------ @@ -269,13 +269,13 @@ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , tm_wday : '0' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM PT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2005 7:03:24 PM PDT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005 7:03:24 PM Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , ------------ @@ -283,13 +283,13 @@ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '205' , tm_wday : '5' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Friday, April 3, 2105 3:03:24 AM PT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2105 3:03:24 AM PDT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2105 3:03:24 AM Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , ------------ @@ -297,12 +297,12 @@ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '-5' , tm_wday : '3' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Wednesday, April 3, 1895 3:03:24 AM PT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 1895 3:03:24 AM PDT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 1895 3:03:24 AM Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_datetype.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_datetype.phpt diff -u pecl/intl/tests/dateformat_get_datetype.phpt:1.3 pecl/intl/tests/dateformat_get_datetype.phpt:1.4 --- pecl/intl/tests/dateformat_get_datetype.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_datetype.phpt Mon May 5 23:46:20 2008 @@ -14,19 +14,19 @@ function ut_main() { $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nCreating DateFormatter with date_type = $datetype_entry"; - $fmt = ut_datefmt_create( "de-DE", $datetype_entry , DateFormatter::SHORT,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with date_type = $datetype_entry"; + $fmt = ut_datefmt_create( "de-DE", $datetype_entry , IntlDateFormatter::SHORT,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $date_type = ut_datefmt_get_datetype( $fmt); $res_str .= "\nAfter call to get_datetype : datetype= $date_type"; $res_str .= "\n"; @@ -42,17 +42,17 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with date_type = 0 +Creating IntlDateFormatter with date_type = 0 After call to get_datetype : datetype= 0 -Creating DateFormatter with date_type = 1 +Creating IntlDateFormatter with date_type = 1 After call to get_datetype : datetype= 1 -Creating DateFormatter with date_type = 2 +Creating IntlDateFormatter with date_type = 2 After call to get_datetype : datetype= 2 -Creating DateFormatter with date_type = 3 +Creating IntlDateFormatter with date_type = 3 After call to get_datetype : datetype= 3 -Creating DateFormatter with date_type = -1 +Creating IntlDateFormatter with date_type = -1 After call to get_datetype : datetype= -1 http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_locale.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_get_locale.phpt diff -u pecl/intl/tests/dateformat_get_locale.phpt:1.4 pecl/intl/tests/dateformat_get_locale.phpt:1.5 --- pecl/intl/tests/dateformat_get_locale.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_locale.phpt Mon May 5 23:46:20 2008 @@ -24,8 +24,8 @@ foreach( $locale_arr as $locale_entry ) { - $res_str .= "\nCreating DateFormatter with locale = $locale_entry"; - $fmt = ut_datefmt_create( $locale_entry , DateFormatter::SHORT,DateFormatter::SHORT,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with locale = $locale_entry"; + $fmt = ut_datefmt_create( $locale_entry , IntlDateFormatter::SHORT,IntlDateFormatter::SHORT,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $locale = ut_datefmt_get_locale( $fmt , 1); $res_str .= "\nAfter call to get_locale : locale= $locale"; $res_str .= "\n"; @@ -41,14 +41,14 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with locale = de-DE +Creating IntlDateFormatter with locale = de-DE After call to get_locale : locale= de_DE -Creating DateFormatter with locale = sl-IT-nedis +Creating IntlDateFormatter with locale = sl-IT-nedis After call to get_locale : locale= sl -Creating DateFormatter with locale = en_UK +Creating IntlDateFormatter with locale = en_UK After call to get_locale : locale= en -Creating DateFormatter with locale = hi +Creating IntlDateFormatter with locale = hi After call to get_locale : locale= hi http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_set_calendar.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_set_calendar.phpt diff -u pecl/intl/tests/dateformat_get_set_calendar.phpt:1.3 pecl/intl/tests/dateformat_get_set_calendar.phpt:1.4 --- pecl/intl/tests/dateformat_get_set_calendar.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_set_calendar.phpt Mon May 5 23:46:20 2008 @@ -14,23 +14,23 @@ function ut_main() { $calendar_arr = array ( - DateFormatter::GREGORIAN, - DateFormatter::TRADITIONAL, + IntlDateFormatter::GREGORIAN, + IntlDateFormatter::TRADITIONAL, 3 ); $res_str = ''; - $start_calendar = DateFormatter::GREGORIAN; - $res_str .= "\nCreating DateFormatter with calendar = $start_calendar"; - $fmt = ut_datefmt_create( "de-DE", DateFormatter::SHORT, DateFormatter::SHORT ,'America/Los_Angeles', DateFormatter::GREGORIAN); + $start_calendar = IntlDateFormatter::GREGORIAN; + $res_str .= "\nCreating IntlDateFormatter with calendar = $start_calendar"; + $fmt = ut_datefmt_create( "de-DE", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT ,'America/Los_Angeles', IntlDateFormatter::GREGORIAN); $calendar = ut_datefmt_get_calendar( $fmt); $res_str .= "\nAfter call to get_calendar : calendar= $calendar"; $res_str .= "\n-------------------"; foreach( $calendar_arr as $calendar_entry ) { - $res_str .= "\nSetting DateFormatter with calendar = $calendar_entry"; + $res_str .= "\nSetting IntlDateFormatter with calendar = $calendar_entry"; ut_datefmt_set_calendar( $fmt, $calendar_entry); $calendar = ut_datefmt_get_calendar( $fmt); $res_str .= "\nAfter call to get_calendar : calendar= $calendar"; @@ -47,15 +47,15 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with calendar = 1 +Creating IntlDateFormatter with calendar = 1 After call to get_calendar : calendar= 1 ------------------- -Setting DateFormatter with calendar = 1 +Setting IntlDateFormatter with calendar = 1 After call to get_calendar : calendar= 1 ------------------- -Setting DateFormatter with calendar = 0 +Setting IntlDateFormatter with calendar = 0 After call to get_calendar : calendar= 0 ------------------- -Setting DateFormatter with calendar = 3 +Setting IntlDateFormatter with calendar = 3 After call to get_calendar : calendar= 0 ------------------- http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_set_pattern.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_get_set_pattern.phpt diff -u pecl/intl/tests/dateformat_get_set_pattern.phpt:1.4 pecl/intl/tests/dateformat_get_set_pattern.phpt:1.5 --- pecl/intl/tests/dateformat_get_set_pattern.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_set_pattern.phpt Mon May 5 23:46:20 2008 @@ -24,9 +24,9 @@ $res_str = ''; $start_pattern = 'dd-MM-YY'; - $res_str .= "\nCreating DateFormatter with pattern = $start_pattern "; - //$fmt = ut_datefmt_create( "en-US", DateFormatter::SHORT, DateFormatter::SHORT , 'America/New_York', DateFormatter::GREGORIAN , $start_pattern ); - $fmt = ut_datefmt_create( "en-US", DateFormatter::FULL, DateFormatter::FULL, 'America/New_York', DateFormatter::GREGORIAN , $start_pattern ); + $res_str .= "\nCreating IntlDateFormatter with pattern = $start_pattern "; + //$fmt = ut_datefmt_create( "en-US", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT , 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern ); + $fmt = ut_datefmt_create( "en-US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern ); $pattern = ut_datefmt_get_pattern( $fmt); $res_str .= "\nAfter call to get_pattern : pattern= $pattern"; $formatted = ut_datefmt_format($fmt,0); @@ -36,7 +36,7 @@ foreach( $pattern_arr as $pattern_entry ) { $res_str .= "\n-------------------"; - $res_str .= "\nSetting DateFormatter with pattern = $pattern_entry "; + $res_str .= "\nSetting IntlDateFormatter with pattern = $pattern_entry "; ut_datefmt_set_pattern( $fmt , $pattern_entry ); $pattern = ut_datefmt_get_pattern( $fmt); $res_str .= "\nAfter call to get_pattern : pattern= $pattern"; @@ -56,30 +56,30 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with pattern = dd-MM-YY +Creating IntlDateFormatter with pattern = dd-MM-YY After call to get_pattern : pattern= dd-MM-YY Result of formatting timestamp=0 is : 31-12-70 ------------------- -Setting DateFormatter with pattern = DD-MM-YYYY hh:mm:ss +Setting IntlDateFormatter with pattern = DD-MM-YYYY hh:mm:ss After call to get_pattern : pattern= DD-MM-YYYY hh:mm:ss Result of formatting timestamp=0 with the new pattern is : 365-12-1970 07:00:00 ------------------- -Setting DateFormatter with pattern = yyyy-DDD.hh:mm:ss z +Setting IntlDateFormatter with pattern = yyyy-DDD.hh:mm:ss z After call to get_pattern : pattern= yyyy-DDD.hh:mm:ss z Result of formatting timestamp=0 with the new pattern is : 1969-365.07:00:00 EST ------------------- -Setting DateFormatter with pattern = yyyy/MM/dd +Setting IntlDateFormatter with pattern = yyyy/MM/dd After call to get_pattern : pattern= yyyy/MM/dd Result of formatting timestamp=0 with the new pattern is : 1969/12/31 ------------------- -Setting DateFormatter with pattern = yyyyMMdd +Setting IntlDateFormatter with pattern = yyyyMMdd After call to get_pattern : pattern= yyyyMMdd Result of formatting timestamp=0 with the new pattern is : 19691231 http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_timetype.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_timetype.phpt diff -u pecl/intl/tests/dateformat_get_timetype.phpt:1.3 pecl/intl/tests/dateformat_get_timetype.phpt:1.4 --- pecl/intl/tests/dateformat_get_timetype.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_timetype.phpt Mon May 5 23:46:20 2008 @@ -14,19 +14,19 @@ function ut_main() { $timetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; foreach( $timetype_arr as $timetype_entry ) { - $res_str .= "\nCreating DateFormatter with time_type = $timetype_entry"; - $fmt = ut_datefmt_create( "de-DE", DateFormatter::SHORT, $timetype_entry ,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with time_type = $timetype_entry"; + $fmt = ut_datefmt_create( "de-DE", IntlDateFormatter::SHORT, $timetype_entry ,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $time_type = ut_datefmt_get_timetype( $fmt); $res_str .= "\nAfter call to get_timetype : timetype= $time_type"; $res_str .= "\n"; @@ -42,17 +42,17 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with time_type = 0 +Creating IntlDateFormatter with time_type = 0 After call to get_timetype : timetype= 0 -Creating DateFormatter with time_type = 1 +Creating IntlDateFormatter with time_type = 1 After call to get_timetype : timetype= 1 -Creating DateFormatter with time_type = 2 +Creating IntlDateFormatter with time_type = 2 After call to get_timetype : timetype= 2 -Creating DateFormatter with time_type = 3 +Creating IntlDateFormatter with time_type = 3 After call to get_timetype : timetype= 3 -Creating DateFormatter with time_type = -1 +Creating IntlDateFormatter with time_type = -1 After call to get_timetype : timetype= -1 http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_timezone_id.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_timezone_id.phpt diff -u pecl/intl/tests/dateformat_get_timezone_id.phpt:1.3 pecl/intl/tests/dateformat_get_timezone_id.phpt:1.4 --- pecl/intl/tests/dateformat_get_timezone_id.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_timezone_id.phpt Mon May 5 23:46:20 2008 @@ -23,8 +23,8 @@ foreach( $timezone_id_arr as $timezone_id_entry ) { - $res_str .= "\nCreating DateFormatter with timezone_id = $timezone_id_entry"; - $fmt = ut_datefmt_create( "de-DE", DateFormatter::SHORT, DateFormatter::SHORT, $timezone_id_entry , DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with timezone_id = $timezone_id_entry"; + $fmt = ut_datefmt_create( "de-DE", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $timezone_id_entry , IntlDateFormatter::GREGORIAN ); $timezone_id = ut_datefmt_get_timezone_id( $fmt); $res_str .= "\nAfter call to get_timezone_id : timezone_id= $timezone_id"; $res_str .= "\n"; @@ -40,11 +40,11 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with timezone_id = America/New_York +Creating IntlDateFormatter with timezone_id = America/New_York After call to get_timezone_id : timezone_id= America/New_York -Creating DateFormatter with timezone_id = America/Los_Angeles +Creating IntlDateFormatter with timezone_id = America/Los_Angeles After call to get_timezone_id : timezone_id= America/Los_Angeles -Creating DateFormatter with timezone_id = America/Dallas +Creating IntlDateFormatter with timezone_id = America/Dallas After call to get_timezone_id : timezone_id= America/Dallas http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_is_set_lenient.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_is_set_lenient.phpt diff -u pecl/intl/tests/dateformat_is_set_lenient.phpt:1.3 pecl/intl/tests/dateformat_is_set_lenient.phpt:1.4 --- pecl/intl/tests/dateformat_is_set_lenient.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_is_set_lenient.phpt Mon May 5 23:46:20 2008 @@ -18,8 +18,8 @@ $res_str = ''; //Create - $fmt = ut_datefmt_create( "en-US", DateFormatter::SHORT, DateFormatter::SHORT , 'America/New_York', DateFormatter::GREGORIAN ); - $res_str .= "\nDateFormatter Created.\n"; + $fmt = ut_datefmt_create( "en-US", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT , 'America/New_York', IntlDateFormatter::GREGORIAN ); + $res_str .= "\nIntlDateFormatter Created.\n"; $resLenient1 = ut_datefmt_is_lenient( $fmt); $res_str .= "After call to get_lenient : lenient= "; @@ -32,7 +32,7 @@ //Set and test $res_str .= "--------------------\n"; $isLenient = TRUE; - $res_str .= "Setting DateFormatter with lenient = "; + $res_str .= "Setting IntlDateFormatter with lenient = "; if( $isLenient){ $res_str .= "TRUE\n"; }else{ @@ -51,7 +51,7 @@ //Set and test $res_str .= "--------------------\n"; $isLenient = FALSE; - $res_str .= "Setting DateFormatter with lenient ="; + $res_str .= "Setting IntlDateFormatter with lenient ="; if( $isLenient){ $res_str .= "TRUE\n"; }else{ @@ -78,12 +78,12 @@ ut_run(); ?> --EXPECT-- -DateFormatter Created. +IntlDateFormatter Created. After call to get_lenient : lenient= TRUE -------------------- -Setting DateFormatter with lenient = TRUE +Setting IntlDateFormatter with lenient = TRUE After call to is_lenient : lenient= TRUE -------------------- -Setting DateFormatter with lenient =FALSE +Setting IntlDateFormatter with lenient =FALSE After call to is_lenient : lenient= FALSE -------------------- http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_localtime.phpt?r1=1.6&r2=1.7&diff_format=u Index: pecl/intl/tests/dateformat_localtime.phpt diff -u pecl/intl/tests/dateformat_localtime.phpt:1.6 pecl/intl/tests/dateformat_localtime.phpt:1.7 --- pecl/intl/tests/dateformat_localtime.phpt:1.6 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_localtime.phpt Mon May 5 23:46:20 2008 @@ -18,19 +18,19 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, ); $res_str = ''; @@ -43,9 +43,9 @@ "19691218 08:49 AM" ); - $fmt1 = ut_datefmt_create( 'en_US_CA', DateFormatter::LONG, DateFormatter::LONG); - $fmt2 = ut_datefmt_create( 'en_US_CA', DateFormatter::MEDIUM, DateFormatter::MEDIUM); - $fmt3 = ut_datefmt_create( 'en_US_CA', DateFormatter::FULL, DateFormatter::FULL); + $fmt1 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::LONG, IntlDateFormatter::LONG); + $fmt2 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM); + $fmt3 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::FULL, IntlDateFormatter::FULL); $fmt_array = array( $fmt1 , $fmt2 ,$fmt3 ); @@ -64,7 +64,7 @@ foreach( $fmt_array as $fmt_entry ){ $res_str .= "\n------------"; - $res_str .= "\nDateFormatter : ".$fmt_desc_array[$cnt]; + $res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt]; $cnt++; $parsed_arr = ut_datefmt_localtime( $fmt_entry , $text_entry , $parse_pos ); @@ -98,37 +98,37 @@ Input text is : Thursday, December 18, 1969 8:49:59 AM PST ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' , ------------------------------- Input text is : June 18, 1969 8:49:59 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '1' , ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL ------------------------------- Input text is : 12/18/69 8:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL ------------------------------- Input text is : 19691218 08:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_parse.phpt?r1=1.7&r2=1.8&diff_format=u Index: pecl/intl/tests/dateformat_parse.phpt diff -u pecl/intl/tests/dateformat_parse.phpt:1.7 pecl/intl/tests/dateformat_parse.phpt:1.8 --- pecl/intl/tests/dateformat_parse.phpt:1.7 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_parse.phpt Mon May 5 23:46:20 2008 @@ -18,11 +18,11 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; @@ -41,7 +41,7 @@ $parse_pos = 0; foreach( $text_arr as $text_entry){ for ( $parse_pos = 0 ; $parse_pos < strlen($text_entry) ; $parse_pos++ ){ - $fmt = ut_datefmt_create( 'en_US_CA', DateFormatter::NONE, DateFormatter::SHORT); + $fmt = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::NONE, IntlDateFormatter::SHORT); $parsed = ut_datefmt_parse( $fmt , $text_entry , $parse_pos ); if( intl_get_error_code() == U_ZERO_ERROR){ $res_str .= "\nInput text :$text_entry ; Parsed text : $parsed"; http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt diff -u pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt:1.4 pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt:1.5 --- pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt Mon May 5 23:46:20 2008 @@ -18,9 +18,9 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, ); $res_str = ''; @@ -33,9 +33,9 @@ "19691218 08:49 AM" ); - $fmt1 = ut_datefmt_create( 'en_US_CA', DateFormatter::LONG, DateFormatter::LONG); - $fmt2 = ut_datefmt_create( 'en_US_CA', DateFormatter::MEDIUM, DateFormatter::MEDIUM); - $fmt3 = ut_datefmt_create( 'en_US_CA', DateFormatter::FULL, DateFormatter::FULL); + $fmt1 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::LONG, IntlDateFormatter::LONG); + $fmt2 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM); + $fmt3 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::FULL, IntlDateFormatter::FULL); $fmt_array = array( $fmt1 , $fmt2 ,$fmt3 ); @@ -51,7 +51,7 @@ $cnt =0; foreach( $fmt_array as $fmt_entry ){ $res_str .= "\n------------"; - $res_str .= "\nDateFormatter : ".$fmt_desc_array[$cnt]; + $res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt]; $cnt++; $parsed_arr = ut_datefmt_localtime( $fmt_entry , $text_entry); @@ -84,37 +84,37 @@ Input text is : Thursday, December 18, 1969 8:49:59 AM PST ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' , ------------------------------- Input text is : June 18, 1969 8:49:59 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '1' , ------------ -DateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' ------------------------------- Input text is : 12/18/69 8:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' ------------------------------- Input text is : 19691218 08:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt diff -u pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt:1.4 pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt:1.5 --- pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt Mon May 5 23:46:20 2008 @@ -18,11 +18,11 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_set_timezone_id.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_set_timezone_id.phpt diff -u pecl/intl/tests/dateformat_set_timezone_id.phpt:1.3 pecl/intl/tests/dateformat_set_timezone_id.phpt:1.4 --- pecl/intl/tests/dateformat_set_timezone_id.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_set_timezone_id.phpt Mon May 5 23:46:20 2008 @@ -23,7 +23,7 @@ $res_str = ''; - $fmt = ut_datefmt_create( "en_US", DateFormatter::FULL, DateFormatter::FULL, 'America/San_Francisco' , DateFormatter::GREGORIAN ); + $fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/San_Francisco' , IntlDateFormatter::GREGORIAN ); $timezone_id = ut_datefmt_get_timezone_id( $fmt ); $res_str .= "\nAfter creation of the dateformatter : timezone_id= $timezone_id\n";
http://cvs.php.net/viewvc.cgi/pecl/intl/config.m4?r1=1.8&r2=1.9&diff_format=u Index: pecl/intl/config.m4 diff -u pecl/intl/config.m4:1.8 pecl/intl/config.m4:1.9 --- pecl/intl/config.m4:1.8 Fri Apr 4 16:56:45 2008 +++ pecl/intl/config.m4 Mon May 5 23:46:20 2008 @@ -1,58 +1,58 @@ -dnl config.m4 for extension intl - -dnl ########################################################################## -dnl Initialize the extension -PHP_ARG_ENABLE(intl, whether to enable internationalization support, -[ --enable-intl Enable internationalization support]) - -if test "$PHP_INTL" != "no"; then - PHP_SETUP_ICU - PHP_REQUIRE_CXX() - - PHP_NEW_EXTENSION(intl, - php_intl.c \ - intl_error.c \ - intl_convert.c \ - collator/collator.c \ - collator/collator_class.c \ - collator/collator_sort.c \ - collator/collator_convert.c \ - collator/collator_locale.c \ - collator/collator_compare.c \ - collator/collator_attr.c \ - collator/collator_create.c \ - collator/collator_is_numeric.c \ - collator/collator_error.c \ - common/common_error.c \ - formatter/formatter.c \ - formatter/formatter_main.c \ - formatter/formatter_class.c \ - formatter/formatter_attr.c \ - formatter/formatter_data.c \ - formatter/formatter_format.c \ - formatter/formatter_parse.c \ - normalizer/normalizer.c \ - normalizer/normalizer_class.c \ - normalizer/normalizer_normalize.c \ - locale/locale.c \ - locale/locale_class.c \ - locale/locale_methods.c \ - msgformat/msgformat.c \ - msgformat/msgformat_attr.c \ - msgformat/msgformat_class.c \ - msgformat/msgformat_data.c \ - msgformat/msgformat_format.c \ - msgformat/msgformat_helpers.cpp \ - msgformat/msgformat_parse.c \ - grapheme/grapheme_string.c \ - grapheme/grapheme_util.c \ - ,$ext_shared,,$ICU_INCS) - - PHP_ADD_BUILD_DIR($ext_builddir/collator) - PHP_ADD_BUILD_DIR($ext_builddir/common) - PHP_ADD_BUILD_DIR($ext_builddir/formatter) - PHP_ADD_BUILD_DIR($ext_builddir/normalizer) - PHP_ADD_BUILD_DIR($ext_builddir/locale) - PHP_ADD_BUILD_DIR($ext_builddir/msgformat) - PHP_ADD_BUILD_DIR($ext_builddir/grapheme) -fi +dnl config.m4 for extension intl + +dnl ########################################################################## +dnl Initialize the extension +PHP_ARG_ENABLE(intl, whether to enable internationalization support, +[ --enable-intl Enable internationalization support]) + +if test "$PHP_INTL" != "no"; then + PHP_SETUP_ICU + PHP_REQUIRE_CXX() + + PHP_NEW_EXTENSION(intl, + php_intl.c \ + intl_error.c \ + intl_convert.c \ + collator/collator.c \ + collator/collator_class.c \ + collator/collator_sort.c \ + collator/collator_convert.c \ + collator/collator_locale.c \ + collator/collator_compare.c \ + collator/collator_attr.c \ + collator/collator_create.c \ + collator/collator_is_numeric.c \ + collator/collator_error.c \ + common/common_error.c \ + formatter/formatter.c \ + formatter/formatter_main.c \ + formatter/formatter_class.c \ + formatter/formatter_attr.c \ + formatter/formatter_data.c \ + formatter/formatter_format.c \ + formatter/formatter_parse.c \ + normalizer/normalizer.c \ + normalizer/normalizer_class.c \ + normalizer/normalizer_normalize.c \ + locale/locale.c \ + locale/locale_class.c \ + locale/locale_methods.c \ + msgformat/msgformat.c \ + msgformat/msgformat_attr.c \ + msgformat/msgformat_class.c \ + msgformat/msgformat_data.c \ + msgformat/msgformat_format.c \ + msgformat/msgformat_helpers.cpp \ + msgformat/msgformat_parse.c \ + grapheme/grapheme_string.c \ + grapheme/grapheme_util.c \ + ,$ext_shared,,$ICU_INCS) + + PHP_ADD_BUILD_DIR($ext_builddir/collator) + PHP_ADD_BUILD_DIR($ext_builddir/common) + PHP_ADD_BUILD_DIR($ext_builddir/formatter) + PHP_ADD_BUILD_DIR($ext_builddir/normalizer) + PHP_ADD_BUILD_DIR($ext_builddir/locale) + PHP_ADD_BUILD_DIR($ext_builddir/msgformat) + PHP_ADD_BUILD_DIR($ext_builddir/grapheme) +fi http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat.c?r1=1.5&r2=1.6&diff_format=u Index: pecl/intl/dateformat/dateformat.c diff -u pecl/intl/dateformat/dateformat.c:1.5 pecl/intl/dateformat/dateformat.c:1.6 --- pecl/intl/dateformat/dateformat.c:1.5 Mon Apr 14 22:16:17 2008 +++ pecl/intl/dateformat/dateformat.c Mon May 5 23:46:20 2008 @@ -32,16 +32,16 @@ */ void dateformat_register_constants( INIT_FUNC_ARGS ) { - if( DateFormatter_ce_ptr == NULL) { + if( IntlDateFormatter_ce_ptr == NULL) { zend_error(E_ERROR, "DateFormat class not defined"); return; } #define DATEFORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS) - #define DATEFORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( DateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UDAT_##x TSRMLS_CC ); - #define DATEFORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( DateFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC ); + #define DATEFORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UDAT_##x TSRMLS_CC ); + #define DATEFORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC ); - #define DATEFORMATTER_EXPOSE_UCAL_CLASS_CONST(x) zend_declare_class_constant_long( DateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UCAL_##x TSRMLS_CC ); + #define DATEFORMATTER_EXPOSE_UCAL_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UCAL_##x TSRMLS_CC ); // UDateFormatStyle constants DATEFORMATTER_EXPOSE_CLASS_CONST( FULL ); @@ -67,9 +67,9 @@ } /* }}} */ -/* {{{ proto DateFormatter DateFormatter::create( string $locale , long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) +/* {{{ proto IntlDateFormatter IntlDateFormatter::create( string $locale , long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) * Create formatter. }}} */ -/* {{{ proto DateFormatter datefmt_create( string $locale, long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) +/* {{{ proto IntlDateFormatter datefmt_create( string $locale, long date_type, long time_type[,string $timezone_str, long $calendar , string $pattern] ) * Create formatter. */ @@ -96,7 +96,7 @@ UCalendar ucal_obj = NULL; - DateFormatter_object* mfo; + IntlDateFormatter_object* mfo; intl_error_reset( NULL TSRMLS_CC ); @@ -110,12 +110,12 @@ } - // Create a DateFormatter object and save the ICU formatter into it. + // Create a IntlDateFormatter object and save the ICU formatter into it. if( ( object = getThis() ) == NULL ) object = return_value; if( Z_TYPE_P( object ) != IS_OBJECT ) - object_init_ex( object, DateFormatter_ce_ptr ); + object_init_ex( object, IntlDateFormatter_ce_ptr ); DATE_FORMAT_METHOD_FETCH_OBJECT; @@ -188,10 +188,10 @@ } /* }}} */ -/* {{{ proto void DateFormatter::__construct( string $locale, string $pattern ) - * DateFormatter object constructor. +/* {{{ proto void IntlDateFormatter::__construct( string $locale, string $pattern ) + * IntlDateFormatter object constructor. */ -PHP_METHOD( DateFormatter, __construct ) +PHP_METHOD( IntlDateFormatter, __construct ) { char* locale = NULL; int locale_len = 0; @@ -212,7 +212,7 @@ int all_done = 0; zval* object; - DateFormatter_object* mfo; + IntlDateFormatter_object* mfo; intl_error_reset( NULL TSRMLS_CC ); @@ -240,7 +240,7 @@ } */ - mfo = (DateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); + mfo = (IntlDateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); intl_error_reset( &mfo->datef_data.error TSRMLS_CC ); @@ -306,19 +306,19 @@ } /* }}} */ -/* {{{ proto int DateFormatter::getErrorCode() +/* {{{ proto int IntlDateFormatter::getErrorCode() * Get formatter's last error code. }}} */ -/* {{{ proto int datefmt_get_error_code( DateFormatter $nf ) +/* {{{ proto int datefmt_get_error_code( IntlDateFormatter $nf ) * Get formatter's last error code. */ PHP_FUNCTION( datefmt_get_error_code ) { zval* object = NULL; - DateFormatter_object* mfo = NULL; + IntlDateFormatter_object* mfo = NULL; // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", - &object, DateFormatter_ce_ptr ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_error_code: unable to parse input params", 0 TSRMLS_CC ); @@ -326,27 +326,27 @@ RETURN_FALSE; } - mfo = (DateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); + mfo = (IntlDateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); // Return formatter's last error code. RETURN_LONG( INTL_DATA_ERROR_CODE(mfo) ); } /* }}} */ -/* {{{ proto string DateFormatter::getErrorMessage( ) +/* {{{ proto string IntlDateFormatter::getErrorMessage( ) * Get text description for formatter's last error code. }}} */ -/* {{{ proto string datefmt_get_error_message( DateFormatter $coll ) +/* {{{ proto string datefmt_get_error_message( IntlDateFormatter $coll ) * Get text description for formatter's last error code. */ PHP_FUNCTION( datefmt_get_error_message ) { char* message = NULL; zval* object = NULL; - DateFormatter_object* mfo = NULL; + IntlDateFormatter_object* mfo = NULL; // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", - &object, DateFormatter_ce_ptr ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_error_message: unable to parse input params", 0 TSRMLS_CC ); @@ -354,7 +354,7 @@ RETURN_FALSE; } - mfo = (DateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); + mfo = (IntlDateFormatter_object *) zend_object_store_get_object( object TSRMLS_CC ); // Return last error message. message = intl_error_get_message( &mfo->datef_data.error TSRMLS_CC ); http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat.h?r1=1.2&r2=1.3&diff_format=u Index: pecl/intl/dateformat/dateformat.h diff -u pecl/intl/dateformat/dateformat.h:1.2 pecl/intl/dateformat/dateformat.h:1.3 --- pecl/intl/dateformat/dateformat.h:1.2 Wed Mar 5 20:26:19 2008 +++ pecl/intl/dateformat/dateformat.h Mon May 5 23:46:20 2008 @@ -22,7 +22,7 @@ PHP_FUNCTION( datefmt_get_error_code ); PHP_FUNCTION( datefmt_get_error_message ); PHP_FUNCTION( datefmt_register_constants ); -PHP_METHOD( DateFormatter, __construct ); +PHP_METHOD( IntlDateFormatter, __construct ); /* These are not necessary at this point of time http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_attr.c?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/dateformat/dateformat_attr.c diff -u pecl/intl/dateformat/dateformat_attr.c:1.4 pecl/intl/dateformat/dateformat_attr.c:1.5 --- pecl/intl/dateformat/dateformat_attr.c:1.4 Fri Apr 4 17:47:30 2008 +++ pecl/intl/dateformat/dateformat_attr.c Mon May 5 23:46:20 2008 @@ -26,7 +26,7 @@ #include <unicode/udat.h> #include <unicode/ucal.h> -static void internal_set_calendar(DateFormatter_object *mfo, char* timezone_id , int timezone_id_len , int calendar ,zval* return_value TSRMLS_DC){ +static void internal_set_calendar(IntlDateFormatter_object *mfo, char* timezone_id , int timezone_id_len , int calendar ,zval* return_value TSRMLS_DC){ int timezone_utf16_len = 0; UChar* timezone_utf16 = NULL; //timezone_id in UTF-16 @@ -63,9 +63,9 @@ } -/* {{{ proto unicode DateFormatter::getDateType( ) +/* {{{ proto unicode IntlDateFormatter::getDateType( ) * Get formatter datetype. }}} */ -/* {{{ proto string datefmt_get_datetype( DateFormatter $mf ) +/* {{{ proto string datefmt_get_datetype( IntlDateFormatter $mf ) * Get formatter datetype. */ PHP_FUNCTION( datefmt_get_datetype ) @@ -73,7 +73,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_datetype: unable to parse input params", 0 TSRMLS_CC ); @@ -89,9 +89,9 @@ } /* }}} */ -/* {{{ proto unicode DateFormatter::getTimeType( ) +/* {{{ proto unicode IntlDateFormatter::getTimeType( ) * Get formatter timetype. }}} */ -/* {{{ proto string datefmt_get_timetype( DateFormatter $mf ) +/* {{{ proto string datefmt_get_timetype( IntlDateFormatter $mf ) * Get formatter timetype. */ PHP_FUNCTION( datefmt_get_timetype ) @@ -99,7 +99,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timetype: unable to parse input params", 0 TSRMLS_CC ); @@ -116,9 +116,9 @@ /* }}} */ -/* {{{ proto unicode DateFormatter::getCalendar( ) +/* {{{ proto unicode IntlDateFormatter::getCalendar( ) * Get formatter calendar. }}} */ -/* {{{ proto string datefmt_get_calendar( DateFormatter $mf ) +/* {{{ proto string datefmt_get_calendar( IntlDateFormatter $mf ) * Get formatter calendar. */ PHP_FUNCTION( datefmt_get_calendar ) @@ -126,7 +126,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_calendar: unable to parse input params", 0 TSRMLS_CC ); @@ -142,9 +142,9 @@ } /* }}} */ -/* {{{ proto unicode DateFormatter::getTimeZoneId( ) +/* {{{ proto unicode IntlDateFormatter::getTimeZoneId( ) * Get formatter timezone_id. }}} */ -/* {{{ proto string datefmt_get_timezone_id( DateFormatter $mf ) +/* {{{ proto string datefmt_get_timezone_id( IntlDateFormatter $mf ) * Get formatter timezone_id. */ PHP_FUNCTION( datefmt_get_timezone_id ) @@ -152,7 +152,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timezone_id: unable to parse input params", 0 TSRMLS_CC ); @@ -171,9 +171,9 @@ } } -/* {{{ proto boolean DateFormatter::setTimeZoneId( $timezone_id) +/* {{{ proto boolean IntlDateFormatter::setTimeZoneId( $timezone_id) * Set formatter timezone_id. }}} */ -/* {{{ proto boolean datefmt_set_timezone_id( DateFormatter $mf ,$timezone_id) +/* {{{ proto boolean datefmt_set_timezone_id( IntlDateFormatter $mf ,$timezone_id) * Set formatter timezone_id. */ PHP_FUNCTION( datefmt_set_timezone_id ) @@ -184,7 +184,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, DateFormatter_ce_ptr ,&timezone_id , &timezone_id_len) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, IntlDateFormatter_ce_ptr ,&timezone_id , &timezone_id_len) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_timezone_id: unable to parse input params", 0 TSRMLS_CC ); @@ -197,7 +197,7 @@ //set the timezone for the calendar internal_set_calendar( mfo , timezone_id , timezone_id_len , mfo->calendar ,return_value TSRMLS_CC ); - //Set the DateFormatter variable + //Set the IntlDateFormatter variable if( mfo->timezone_id ){ efree(mfo->timezone_id); } @@ -206,9 +206,9 @@ RETURN_TRUE; } -/* {{{ proto string DateFormatter::getPattern( ) +/* {{{ proto string IntlDateFormatter::getPattern( ) * Get formatter pattern. }}} */ -/* {{{ proto string datefmt_get_pattern( DateFormatter $mf ) +/* {{{ proto string datefmt_get_pattern( IntlDateFormatter $mf ) * Get formatter pattern. */ PHP_FUNCTION( datefmt_get_pattern ) @@ -221,7 +221,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, DateFormatter_ce_ptr ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_pattern: unable to parse input params", 0 TSRMLS_CC ); @@ -248,9 +248,9 @@ } /* }}} */ -/* {{{ proto bool DateFormatter::setPattern( string $pattern ) +/* {{{ proto bool IntlDateFormatter::setPattern( string $pattern ) * Set formatter pattern. }}} */ -/* {{{ proto bool datefmt_set_pattern( DateFormatter $mf, string $pattern ) +/* {{{ proto bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern ) * Set formatter pattern. */ PHP_FUNCTION( datefmt_set_pattern ) @@ -266,7 +266,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", - &object, DateFormatter_ce_ptr, &value, &value_len ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr, &value, &value_len ) == FAILURE ) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_pattern: unable to parse input params", 0 TSRMLS_CC); @@ -288,9 +288,9 @@ } /* }}} */ -/* {{{ proto string DateFormatter::getLocale() +/* {{{ proto string IntlDateFormatter::getLocale() * Get formatter locale. }}} */ -/* {{{ proto string datefmt_get_locale(DateFormatter $mf) +/* {{{ proto string datefmt_get_locale(IntlDateFormatter $mf) * Get formatter locale. */ PHP_FUNCTION( datefmt_get_locale ) @@ -302,7 +302,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", - &object, DateFormatter_ce_ptr ,&loc_type) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ,&loc_type) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_locale: unable to parse input params", 0 TSRMLS_CC ); @@ -318,9 +318,9 @@ } /* }}} */ -/* {{{ proto string DateFormatter::isLenient() +/* {{{ proto string IntlDateFormatter::isLenient() * Get formatter isLenient. }}} */ -/* {{{ proto string datefmt_isLenient(DateFormatter $mf) +/* {{{ proto string datefmt_isLenient(IntlDateFormatter $mf) * Get formatter locale. */ PHP_FUNCTION( datefmt_is_lenient ) @@ -330,7 +330,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", - &object, DateFormatter_ce_ptr ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_is_lenient: unable to parse input params", 0 TSRMLS_CC ); @@ -345,9 +345,9 @@ } /* }}} */ -/* {{{ proto string DateFormatter::setLenient() +/* {{{ proto string IntlDateFormatter::setLenient() * Set formatter lenient. }}} */ -/* {{{ proto string datefmt_setLenient(DateFormatter $mf) +/* {{{ proto string datefmt_setLenient(IntlDateFormatter $mf) * Set formatter lenient. */ PHP_FUNCTION( datefmt_set_lenient ) @@ -359,7 +359,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ob", - &object, DateFormatter_ce_ptr ,&isLenient ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr ,&isLenient ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_lenient: unable to parse input params", 0 TSRMLS_CC ); @@ -374,9 +374,9 @@ } /* }}} */ -/* {{{ proto bool DateFormatter::setPattern( int $calendar ) +/* {{{ proto bool IntlDateFormatter::setPattern( int $calendar ) * Set formatter calendar. }}} */ -/* {{{ proto bool datefmt_set_calendar( DateFormatter $mf, int $calendar ) +/* {{{ proto bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar ) * Set formatter calendar. */ PHP_FUNCTION( datefmt_set_calendar ) @@ -387,7 +387,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", - &object, DateFormatter_ce_ptr, &calendar ) == FAILURE ) + &object, IntlDateFormatter_ce_ptr, &calendar ) == FAILURE ) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_calendar: unable to parse input params", 0 TSRMLS_CC); @@ -406,7 +406,7 @@ internal_set_calendar( mfo , mfo->timezone_id , strlen(mfo->timezone_id) , calendar ,return_value TSRMLS_CC ); - //Set the calendar value in the DateFormatter object + //Set the calendar value in the IntlDateFormatter object mfo->calendar = calendar ; RETURN_TRUE; http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_class.c?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/dateformat/dateformat_class.c diff -u pecl/intl/dateformat/dateformat_class.c:1.3 pecl/intl/dateformat/dateformat_class.c:1.4 --- pecl/intl/dateformat/dateformat_class.c:1.3 Thu Mar 6 20:36:21 2008 +++ pecl/intl/dateformat/dateformat_class.c Mon May 5 23:46:20 2008 @@ -23,23 +23,23 @@ #include "dateformat.h" #include "dateformat_attr.h" -zend_class_entry *DateFormatter_ce_ptr = NULL; +zend_class_entry *IntlDateFormatter_ce_ptr = NULL; ///////////////////////////////////////////////////////////////////////////// -// Auxiliary functions needed by objects of 'DateFormatter' class +// Auxiliary functions needed by objects of 'IntlDateFormatter' class ///////////////////////////////////////////////////////////////////////////// -/* {{{ DateFormatter_objects_dtor */ -static void DateFormatter_object_dtor(void *object, zend_object_handle handle TSRMLS_DC ) +/* {{{ IntlDateFormatter_objects_dtor */ +static void IntlDateFormatter_object_dtor(void *object, zend_object_handle handle TSRMLS_DC ) { zend_objects_destroy_object( object, handle TSRMLS_CC ); } /* }}} */ -/* {{{ DateFormatter_objects_free */ -void DateFormatter_object_free( zend_object *object TSRMLS_DC ) +/* {{{ IntlDateFormatter_objects_free */ +void IntlDateFormatter_object_free( zend_object *object TSRMLS_DC ) { - DateFormatter_object* mfo = (DateFormatter_object*)object; + IntlDateFormatter_object* mfo = (IntlDateFormatter_object*)object; zend_object_std_dtor( &mfo->zo TSRMLS_CC ); @@ -53,13 +53,13 @@ } /* }}} */ -/* {{{ DateFormatter_object_create */ -zend_object_value DateFormatter_object_create(zend_class_entry *ce TSRMLS_DC) +/* {{{ IntlDateFormatter_object_create */ +zend_object_value IntlDateFormatter_object_create(zend_class_entry *ce TSRMLS_DC) { zend_object_value retval; - DateFormatter_object* intern; + IntlDateFormatter_object* intern; - intern = ecalloc( 1, sizeof(DateFormatter_object) ); + intern = ecalloc( 1, sizeof(IntlDateFormatter_object) ); dateformat_data_init( &intern->datef_data TSRMLS_CC ); zend_object_std_init( &intern->zo, ce TSRMLS_CC ); intern->date_type = 0; @@ -69,8 +69,8 @@ retval.handle = zend_objects_store_put( intern, - DateFormatter_object_dtor, - (zend_objects_free_object_storage_t)DateFormatter_object_free, + IntlDateFormatter_object_dtor, + (zend_objects_free_object_storage_t)IntlDateFormatter_object_free, NULL TSRMLS_CC ); retval.handlers = zend_get_std_object_handlers(); @@ -80,15 +80,15 @@ /* }}} */ ///////////////////////////////////////////////////////////////////////////// -// 'DateFormatter' class registration structures & functions +// 'IntlDateFormatter' class registration structures & functions ///////////////////////////////////////////////////////////////////////////// -/* {{{ DateFormatter_class_functions - * Every 'DateFormatter' class method has an entry in this table +/* {{{ IntlDateFormatter_class_functions + * Every 'IntlDateFormatter' class method has an entry in this table */ -static function_entry DateFormatter_class_functions[] = { - PHP_ME( DateFormatter, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) +static function_entry IntlDateFormatter_class_functions[] = { + PHP_ME( IntlDateFormatter, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR ) ZEND_FENTRY( create, ZEND_FN( datefmt_create ), NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), NULL ) PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), NULL ) @@ -111,21 +111,21 @@ /* }}} */ /* {{{ dateformat_register_class - * Initialize 'DateFormatter' class + * Initialize 'IntlDateFormatter' class */ -void dateformat_register_DateFormatter_class( TSRMLS_D ) +void dateformat_register_IntlDateFormatter_class( TSRMLS_D ) { zend_class_entry ce; - // Create and register 'DateFormatter' class. - INIT_CLASS_ENTRY( ce, "DateFormatter", DateFormatter_class_functions ); - ce.create_object = DateFormatter_object_create; - DateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC ); + // Create and register 'IntlDateFormatter' class. + INIT_CLASS_ENTRY( ce, "IntlDateFormatter", IntlDateFormatter_class_functions ); + ce.create_object = IntlDateFormatter_object_create; + IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC ); - // Declare 'DateFormatter' class properties. - if( !DateFormatter_ce_ptr ) + // Declare 'IntlDateFormatter' class properties. + if( !IntlDateFormatter_ce_ptr ) { - zend_error(E_ERROR, "Failed to register DateFormatter class"); + zend_error(E_ERROR, "Failed to register IntlDateFormatter class"); return; } } http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_class.h?r1=1.2&r2=1.3&diff_format=u Index: pecl/intl/dateformat/dateformat_class.h diff -u pecl/intl/dateformat/dateformat_class.h:1.2 pecl/intl/dateformat/dateformat_class.h:1.3 --- pecl/intl/dateformat/dateformat_class.h:1.2 Wed Mar 5 20:26:19 2008 +++ pecl/intl/dateformat/dateformat_class.h Mon May 5 23:46:20 2008 @@ -30,15 +30,15 @@ int time_type ; int calendar ; char* timezone_id; -} DateFormatter_object; +} IntlDateFormatter_object; -void dateformat_register_DateFormatter_class( TSRMLS_D ); -extern zend_class_entry *DateFormatter_ce_ptr; +void dateformat_register_IntlDateFormatter_class( TSRMLS_D ); +extern zend_class_entry *IntlDateFormatter_ce_ptr; /* Auxiliary macros */ -#define DATE_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(DateFormatter, mfo) -#define DATE_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(DateFormatter, mfo) +#define DATE_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(IntlDateFormatter, mfo) +#define DATE_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(IntlDateFormatter, mfo) #define DATE_FORMAT_OBJECT(mfo) (mfo)->datef_data.udatf #endif // #ifndef DATE_FORMAT_CLASS_H http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_format.c?r1=1.6&r2=1.7&diff_format=u Index: pecl/intl/dateformat/dateformat_format.c diff -u pecl/intl/dateformat/dateformat_format.c:1.6 pecl/intl/dateformat/dateformat_format.c:1.7 --- pecl/intl/dateformat/dateformat_format.c:1.6 Thu Apr 3 20:58:15 2008 +++ pecl/intl/dateformat/dateformat_format.c Mon May 5 23:46:20 2008 @@ -31,7 +31,7 @@ /* {{{ * Internal function which calls the udat_format */ -static void internal_format(DateFormatter_object *mfo, UDate timestamp , zval *return_value TSRMLS_DC){ +static void internal_format(IntlDateFormatter_object *mfo, UDate timestamp , zval *return_value TSRMLS_DC){ UChar* formatted = NULL; int32_t resultlengthneeded =0 ; @@ -57,7 +57,7 @@ /* {{{ * Internal function which fetches an element from the passed array for the key_name passed */ -static double internal_get_arr_ele(DateFormatter_object *mfo , HashTable* hash_arr ,char* key_name TSRMLS_DC){ +static double internal_get_arr_ele(IntlDateFormatter_object *mfo , HashTable* hash_arr ,char* key_name TSRMLS_DC){ zval** ele_value = NULL; UDate result = -1; @@ -77,7 +77,7 @@ /* {{{ * Internal function which creates a UCalendar from the passed array */ -static void internal_create_ucal(DateFormatter_object *mfo, HashTable* hash_arr , UCalendar* pcal TSRMLS_DC){ +static void internal_create_ucal(IntlDateFormatter_object *mfo, HashTable* hash_arr , UCalendar* pcal TSRMLS_DC){ long year =0; long month =0; long hour =0; @@ -115,7 +115,7 @@ } -/* {{{ proto string DateFormatter::format( [mixed]int $args or array $args ) +/* {{{ proto string IntlDateFormatter::format( [mixed]int $args or array $args ) * Format the time value as a string. }}}*/ /* {{{ proto string datefmt_format( [mixed]int $args or array $args ) * Format the time value as a string. }}}*/ @@ -130,7 +130,7 @@ DATE_FORMAT_METHOD_INIT_VARS; // Parse parameters. - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz", &object, DateFormatter_ce_ptr ,&zarg ) == FAILURE ) + if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz", &object, IntlDateFormatter_ce_ptr ,&zarg ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: unable to parse input params", 0 TSRMLS_CC ); http://cvs.php.net/viewvc.cgi/pecl/intl/dateformat/dateformat_parse.c?r1=1.9&r2=1.10&diff_format=u Index: pecl/intl/dateformat/dateformat_parse.c diff -u pecl/intl/dateformat/dateformat_parse.c:1.9 pecl/intl/dateformat/dateformat_parse.c:1.10 --- pecl/intl/dateformat/dateformat_parse.c:1.9 Tue Apr 8 17:17:37 2008 +++ pecl/intl/dateformat/dateformat_parse.c Mon May 5 23:46:20 2008 @@ -33,7 +33,7 @@ * if set to 1 - store any error encountered in the parameter parse_error * if set to 0 - no need to store any error encountered in the parameter parse_error */ -static void internal_parse_to_timestamp(DateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ +static void internal_parse_to_timestamp(IntlDateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ long result = 0; UDate timestamp =0; UChar* text_utf16 = NULL; @@ -60,7 +60,7 @@ } /* }}} */ -static void add_to_localtime_arr( DateFormatter_object *mfo, zval* return_value ,UCalendar parsed_calendar , long calendar_field , char* key_name TSRMLS_DC){ +static void add_to_localtime_arr( IntlDateFormatter_object *mfo, zval* return_value ,UCalendar parsed_calendar , long calendar_field , char* key_name TSRMLS_DC){ long calendar_field_val = ucal_get( parsed_calendar , calendar_field , &INTL_DATA_ERROR_CODE(mfo)); INTL_METHOD_CHECK_STATUS( mfo, "Date parsing - localtime failed : could not get a field from calendar" ); @@ -78,7 +78,7 @@ /* {{{ * Internal function which calls the udat_parseCalendar */ -static void internal_parse_to_localtime(DateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ +static void internal_parse_to_localtime(IntlDateFormatter_object *mfo, char* text_to_parse , int32_t text_len, int parse_pos , zval *return_value TSRMLS_DC){ UCalendar* parsed_calendar = NULL ; UChar* text_utf16 = NULL; int32_t text_utf16_len = 0; @@ -116,9 +116,9 @@ /* }}} */ -/* {{{ proto integer DateFormatter::parse( string $text_to_parse , int $parse_pos ) +/* {{{ proto integer IntlDateFormatter::parse( string $text_to_parse , int $parse_pos ) * Parse the string $value starting at parse_pos to a Unix timestamp -int }}}*/ -/* {{{ proto integer datefmt_parse( DateFormatter $fmt, string $text_to_parse , int $parse_pos ) +/* {{{ proto integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse , int $parse_pos ) * Parse the string $value starting at parse_pos to a Unix timestamp -int }}}*/ PHP_FUNCTION(datefmt_parse) { @@ -131,7 +131,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", - &object, DateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ + &object, IntlDateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; @@ -147,9 +147,9 @@ } /* }}} */ -/* {{{ proto integer DateFormatter::localtime( string $text_to_parse, int $parse_pos )) +/* {{{ proto integer IntlDateFormatter::localtime( string $text_to_parse, int $parse_pos )) * Parse the string $value to a localtime array }}}*/ -/* {{{ proto integer datefmt_localtime( DateFormatter $fmt, string $text_to_parse, int $parse_pos )) +/* {{{ proto integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse, int $parse_pos )) * Parse the string $value to a localtime array }}}*/ PHP_FUNCTION(datefmt_localtime) { @@ -162,7 +162,7 @@ // Parse parameters. if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osl", - &object, DateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ + &object, IntlDateFormatter_ce_ptr, &text_to_parse , &text_len , &parse_pos ) == FAILURE ){ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse_to_localtime: unable to parse input params", 0 TSRMLS_CC ); http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_format.phpt?r1=1.6&r2=1.7&diff_format=u Index: pecl/intl/tests/dateformat_format.phpt diff -u pecl/intl/tests/dateformat_format.phpt:1.6 pecl/intl/tests/dateformat_format.phpt:1.7 --- pecl/intl/tests/dateformat_format.phpt:1.6 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_format.phpt Mon May 5 23:46:20 2008 @@ -18,11 +18,11 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; @@ -87,9 +87,9 @@ foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - //$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', DateFormatter::GREGORIAN ,"dd/mm/yyyy"); - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + //$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ,"dd/mm/yyyy"); + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); //$fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry); $formatted = ut_datefmt_format( $fmt , $timestamp_entry); $res_str .= "\nFormatted timestamp is : $formatted"; @@ -109,7 +109,7 @@ foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry); $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); if( intl_get_error_code() == U_ZERO_ERROR){ @@ -136,163 +136,163 @@ Input timestamp is : 0 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 4:00:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 4:00:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 4:00 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 04:00 PM ------------ Input timestamp is : -1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 17, 1969 6:40:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 17, 1969 6:40:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/17/69 6:40 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691217 06:40 PM ------------ Input timestamp is : 1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : January 14, 1970 1:20:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Jan 14, 1970 1:20:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 1/14/70 1:20 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19700114 01:20 PM ------------ Input timestamp is : 2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Sunday, September 18, 2039 4:06:40 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : September 18, 2039 4:06:40 PM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Sep 18, 2039 4:06:40 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 9/18/39 4:06 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 20390918 04:06 PM ------------ Input timestamp is : -2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Saturday, April 14, 1900 5:53:20 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : April 14, 1900 5:53:20 PM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Apr 14, 1900 5:53:20 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 4/14/00 5:53 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19000414 05:53 PM ------------ Input timestamp is : 90099999 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : November 8, 1972 11:46:39 AM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Nov 8, 1972 11:46:39 AM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 11/8/72 11:46 AM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19721108 11:46 AM ------------ Input timestamp is : 3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 5:00:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 5:00:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 5:00 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 05:00 PM ------------ Input timestamp is : -3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 3:00:00 PM PST -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 3:00:00 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted timestamp is : 12/31/69 3:00 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted timestamp is : 19691231 03:00 PM ------------ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , tm_wday : '0' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2005 7:03:24 PM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005 7:03:24 PM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/05 7:03 PM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 20050403 07:03 PM ------------ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '205' , tm_wday : '5' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Friday, April 3, 2105 3:03:24 AM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2105 3:03:24 AM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2105 3:03:24 AM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/05 3:03 AM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 21050403 03:03 AM ------------ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '-5' , tm_wday : '3' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Wednesday, April 3, 1895 3:03:24 AM PT -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 1895 3:03:24 AM PDT -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 1895 3:03:24 AM -DateFormatter locale= en_US ,datetype = 3 ,timetype =3 +IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 Formatted localtime_array is : 4/3/95 3:03 AM -DateFormatter locale= en_US ,datetype = -1 ,timetype =-1 +IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 18950403 03:03 AM http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_format_parse.phpt?r1=1.2&r2=1.3&diff_format=u Index: pecl/intl/tests/dateformat_format_parse.phpt diff -u pecl/intl/tests/dateformat_format_parse.phpt:1.2 pecl/intl/tests/dateformat_format_parse.phpt:1.3 --- pecl/intl/tests/dateformat_format_parse.phpt:1.2 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_format_parse.phpt Mon May 5 23:46:20 2008 @@ -18,9 +18,9 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM ); $res_str = ''; @@ -84,8 +84,8 @@ $res_str .= "\n------------\n"; foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $formatted = ut_datefmt_format( $fmt , $timestamp_entry); $res_str .= "\nFormatted timestamp is : $formatted"; $parsed = ut_datefmt_parse( $fmt , $formatted); @@ -109,7 +109,7 @@ $res_str .= "\n------------\n"; foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; + $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry); $formatted1 = ut_datefmt_format( $fmt , $localtime_entry); if( intl_get_error_code() == U_ZERO_ERROR){ @@ -151,13 +151,13 @@ Input timestamp is : 0 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT Parsed timestamp is : 0 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 4:00:00 PM PST Parsed timestamp is : 0 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 4:00:00 PM Parsed timestamp is : 0 ------------ @@ -165,13 +165,13 @@ Input timestamp is : -1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT Parsed timestamp is : -1200000 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 17, 1969 6:40:00 PM PST Parsed timestamp is : -1200000 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 17, 1969 6:40:00 PM Parsed timestamp is : -1200000 ------------ @@ -179,13 +179,13 @@ Input timestamp is : 1200000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT Parsed timestamp is : 1200000 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : January 14, 1970 1:20:00 PM PST Parsed timestamp is : 1200000 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Jan 14, 1970 1:20:00 PM Parsed timestamp is : 1200000 ------------ @@ -193,15 +193,15 @@ Input timestamp is : 2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Sunday, September 18, 2039 4:06:40 PM PT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : September 18, 2039 4:06:40 PM PDT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Sep 18, 2039 4:06:40 PM Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' @@ -210,15 +210,15 @@ Input timestamp is : -2200000000 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Saturday, April 14, 1900 5:53:20 PM PT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : April 14, 1900 5:53:20 PM PDT Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Apr 14, 1900 5:53:20 PM Error while parsing as: 'datefmt_parse: parsing of input parametrs resulted in value larger than data type long can handle. The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT.: U_BUFFER_OVERFLOW_ERROR' @@ -227,13 +227,13 @@ Input timestamp is : 90099999 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT Parsed timestamp is : 90099999 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : November 8, 1972 11:46:39 AM PST Parsed timestamp is : 90099999 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Nov 8, 1972 11:46:39 AM Parsed timestamp is : 90099999 ------------ @@ -241,13 +241,13 @@ Input timestamp is : 3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT Parsed timestamp is : 3600 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 5:00:00 PM PST Parsed timestamp is : 3600 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 5:00:00 PM Parsed timestamp is : 3600 ------------ @@ -255,13 +255,13 @@ Input timestamp is : -3600 ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT Parsed timestamp is : -3600 -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted timestamp is : December 31, 1969 3:00:00 PM PST Parsed timestamp is : -3600 -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted timestamp is : Dec 31, 1969 3:00:00 PM Parsed timestamp is : -3600 ------------ @@ -269,13 +269,13 @@ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , tm_wday : '0' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM PT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2005 7:03:24 PM PDT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005 7:03:24 PM Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , ------------ @@ -283,13 +283,13 @@ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '205' , tm_wday : '5' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Friday, April 3, 2105 3:03:24 AM PT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 2105 3:03:24 AM PDT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2105 3:03:24 AM Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , ------------ @@ -297,12 +297,12 @@ Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '-5' , tm_wday : '3' , tm_yday : '93' , tm_isdst : '1' , ------------ -DateFormatter locale= en_US ,datetype = 0 ,timetype =0 +IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 Formatted localtime_array is : Wednesday, April 3, 1895 3:03:24 AM PT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 1 ,timetype =1 +IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 Formatted localtime_array is : April 3, 1895 3:03:24 AM PDT Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , -DateFormatter locale= en_US ,datetype = 2 ,timetype =2 +IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 1895 3:03:24 AM Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' , http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_datetype.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_datetype.phpt diff -u pecl/intl/tests/dateformat_get_datetype.phpt:1.3 pecl/intl/tests/dateformat_get_datetype.phpt:1.4 --- pecl/intl/tests/dateformat_get_datetype.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_datetype.phpt Mon May 5 23:46:20 2008 @@ -14,19 +14,19 @@ function ut_main() { $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\nCreating DateFormatter with date_type = $datetype_entry"; - $fmt = ut_datefmt_create( "de-DE", $datetype_entry , DateFormatter::SHORT,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with date_type = $datetype_entry"; + $fmt = ut_datefmt_create( "de-DE", $datetype_entry , IntlDateFormatter::SHORT,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $date_type = ut_datefmt_get_datetype( $fmt); $res_str .= "\nAfter call to get_datetype : datetype= $date_type"; $res_str .= "\n"; @@ -42,17 +42,17 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with date_type = 0 +Creating IntlDateFormatter with date_type = 0 After call to get_datetype : datetype= 0 -Creating DateFormatter with date_type = 1 +Creating IntlDateFormatter with date_type = 1 After call to get_datetype : datetype= 1 -Creating DateFormatter with date_type = 2 +Creating IntlDateFormatter with date_type = 2 After call to get_datetype : datetype= 2 -Creating DateFormatter with date_type = 3 +Creating IntlDateFormatter with date_type = 3 After call to get_datetype : datetype= 3 -Creating DateFormatter with date_type = -1 +Creating IntlDateFormatter with date_type = -1 After call to get_datetype : datetype= -1 http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_locale.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_get_locale.phpt diff -u pecl/intl/tests/dateformat_get_locale.phpt:1.4 pecl/intl/tests/dateformat_get_locale.phpt:1.5 --- pecl/intl/tests/dateformat_get_locale.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_locale.phpt Mon May 5 23:46:20 2008 @@ -24,8 +24,8 @@ foreach( $locale_arr as $locale_entry ) { - $res_str .= "\nCreating DateFormatter with locale = $locale_entry"; - $fmt = ut_datefmt_create( $locale_entry , DateFormatter::SHORT,DateFormatter::SHORT,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with locale = $locale_entry"; + $fmt = ut_datefmt_create( $locale_entry , IntlDateFormatter::SHORT,IntlDateFormatter::SHORT,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $locale = ut_datefmt_get_locale( $fmt , 1); $res_str .= "\nAfter call to get_locale : locale= $locale"; $res_str .= "\n"; @@ -41,14 +41,14 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with locale = de-DE +Creating IntlDateFormatter with locale = de-DE After call to get_locale : locale= de_DE -Creating DateFormatter with locale = sl-IT-nedis +Creating IntlDateFormatter with locale = sl-IT-nedis After call to get_locale : locale= sl -Creating DateFormatter with locale = en_UK +Creating IntlDateFormatter with locale = en_UK After call to get_locale : locale= en -Creating DateFormatter with locale = hi +Creating IntlDateFormatter with locale = hi After call to get_locale : locale= hi http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_set_calendar.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_set_calendar.phpt diff -u pecl/intl/tests/dateformat_get_set_calendar.phpt:1.3 pecl/intl/tests/dateformat_get_set_calendar.phpt:1.4 --- pecl/intl/tests/dateformat_get_set_calendar.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_set_calendar.phpt Mon May 5 23:46:20 2008 @@ -14,23 +14,23 @@ function ut_main() { $calendar_arr = array ( - DateFormatter::GREGORIAN, - DateFormatter::TRADITIONAL, + IntlDateFormatter::GREGORIAN, + IntlDateFormatter::TRADITIONAL, 3 ); $res_str = ''; - $start_calendar = DateFormatter::GREGORIAN; - $res_str .= "\nCreating DateFormatter with calendar = $start_calendar"; - $fmt = ut_datefmt_create( "de-DE", DateFormatter::SHORT, DateFormatter::SHORT ,'America/Los_Angeles', DateFormatter::GREGORIAN); + $start_calendar = IntlDateFormatter::GREGORIAN; + $res_str .= "\nCreating IntlDateFormatter with calendar = $start_calendar"; + $fmt = ut_datefmt_create( "de-DE", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT ,'America/Los_Angeles', IntlDateFormatter::GREGORIAN); $calendar = ut_datefmt_get_calendar( $fmt); $res_str .= "\nAfter call to get_calendar : calendar= $calendar"; $res_str .= "\n-------------------"; foreach( $calendar_arr as $calendar_entry ) { - $res_str .= "\nSetting DateFormatter with calendar = $calendar_entry"; + $res_str .= "\nSetting IntlDateFormatter with calendar = $calendar_entry"; ut_datefmt_set_calendar( $fmt, $calendar_entry); $calendar = ut_datefmt_get_calendar( $fmt); $res_str .= "\nAfter call to get_calendar : calendar= $calendar"; @@ -47,15 +47,15 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with calendar = 1 +Creating IntlDateFormatter with calendar = 1 After call to get_calendar : calendar= 1 ------------------- -Setting DateFormatter with calendar = 1 +Setting IntlDateFormatter with calendar = 1 After call to get_calendar : calendar= 1 ------------------- -Setting DateFormatter with calendar = 0 +Setting IntlDateFormatter with calendar = 0 After call to get_calendar : calendar= 0 ------------------- -Setting DateFormatter with calendar = 3 +Setting IntlDateFormatter with calendar = 3 After call to get_calendar : calendar= 0 ------------------- http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_set_pattern.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_get_set_pattern.phpt diff -u pecl/intl/tests/dateformat_get_set_pattern.phpt:1.4 pecl/intl/tests/dateformat_get_set_pattern.phpt:1.5 --- pecl/intl/tests/dateformat_get_set_pattern.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_set_pattern.phpt Mon May 5 23:46:20 2008 @@ -24,9 +24,9 @@ $res_str = ''; $start_pattern = 'dd-MM-YY'; - $res_str .= "\nCreating DateFormatter with pattern = $start_pattern "; - //$fmt = ut_datefmt_create( "en-US", DateFormatter::SHORT, DateFormatter::SHORT , 'America/New_York', DateFormatter::GREGORIAN , $start_pattern ); - $fmt = ut_datefmt_create( "en-US", DateFormatter::FULL, DateFormatter::FULL, 'America/New_York', DateFormatter::GREGORIAN , $start_pattern ); + $res_str .= "\nCreating IntlDateFormatter with pattern = $start_pattern "; + //$fmt = ut_datefmt_create( "en-US", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT , 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern ); + $fmt = ut_datefmt_create( "en-US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern ); $pattern = ut_datefmt_get_pattern( $fmt); $res_str .= "\nAfter call to get_pattern : pattern= $pattern"; $formatted = ut_datefmt_format($fmt,0); @@ -36,7 +36,7 @@ foreach( $pattern_arr as $pattern_entry ) { $res_str .= "\n-------------------"; - $res_str .= "\nSetting DateFormatter with pattern = $pattern_entry "; + $res_str .= "\nSetting IntlDateFormatter with pattern = $pattern_entry "; ut_datefmt_set_pattern( $fmt , $pattern_entry ); $pattern = ut_datefmt_get_pattern( $fmt); $res_str .= "\nAfter call to get_pattern : pattern= $pattern"; @@ -56,30 +56,30 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with pattern = dd-MM-YY +Creating IntlDateFormatter with pattern = dd-MM-YY After call to get_pattern : pattern= dd-MM-YY Result of formatting timestamp=0 is : 31-12-70 ------------------- -Setting DateFormatter with pattern = DD-MM-YYYY hh:mm:ss +Setting IntlDateFormatter with pattern = DD-MM-YYYY hh:mm:ss After call to get_pattern : pattern= DD-MM-YYYY hh:mm:ss Result of formatting timestamp=0 with the new pattern is : 365-12-1970 07:00:00 ------------------- -Setting DateFormatter with pattern = yyyy-DDD.hh:mm:ss z +Setting IntlDateFormatter with pattern = yyyy-DDD.hh:mm:ss z After call to get_pattern : pattern= yyyy-DDD.hh:mm:ss z Result of formatting timestamp=0 with the new pattern is : 1969-365.07:00:00 EST ------------------- -Setting DateFormatter with pattern = yyyy/MM/dd +Setting IntlDateFormatter with pattern = yyyy/MM/dd After call to get_pattern : pattern= yyyy/MM/dd Result of formatting timestamp=0 with the new pattern is : 1969/12/31 ------------------- -Setting DateFormatter with pattern = yyyyMMdd +Setting IntlDateFormatter with pattern = yyyyMMdd After call to get_pattern : pattern= yyyyMMdd Result of formatting timestamp=0 with the new pattern is : 19691231 http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_timetype.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_timetype.phpt diff -u pecl/intl/tests/dateformat_get_timetype.phpt:1.3 pecl/intl/tests/dateformat_get_timetype.phpt:1.4 --- pecl/intl/tests/dateformat_get_timetype.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_timetype.phpt Mon May 5 23:46:20 2008 @@ -14,19 +14,19 @@ function ut_main() { $timetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; foreach( $timetype_arr as $timetype_entry ) { - $res_str .= "\nCreating DateFormatter with time_type = $timetype_entry"; - $fmt = ut_datefmt_create( "de-DE", DateFormatter::SHORT, $timetype_entry ,'America/Los_Angeles', DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with time_type = $timetype_entry"; + $fmt = ut_datefmt_create( "de-DE", IntlDateFormatter::SHORT, $timetype_entry ,'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); $time_type = ut_datefmt_get_timetype( $fmt); $res_str .= "\nAfter call to get_timetype : timetype= $time_type"; $res_str .= "\n"; @@ -42,17 +42,17 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with time_type = 0 +Creating IntlDateFormatter with time_type = 0 After call to get_timetype : timetype= 0 -Creating DateFormatter with time_type = 1 +Creating IntlDateFormatter with time_type = 1 After call to get_timetype : timetype= 1 -Creating DateFormatter with time_type = 2 +Creating IntlDateFormatter with time_type = 2 After call to get_timetype : timetype= 2 -Creating DateFormatter with time_type = 3 +Creating IntlDateFormatter with time_type = 3 After call to get_timetype : timetype= 3 -Creating DateFormatter with time_type = -1 +Creating IntlDateFormatter with time_type = -1 After call to get_timetype : timetype= -1 http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_get_timezone_id.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_get_timezone_id.phpt diff -u pecl/intl/tests/dateformat_get_timezone_id.phpt:1.3 pecl/intl/tests/dateformat_get_timezone_id.phpt:1.4 --- pecl/intl/tests/dateformat_get_timezone_id.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_get_timezone_id.phpt Mon May 5 23:46:20 2008 @@ -23,8 +23,8 @@ foreach( $timezone_id_arr as $timezone_id_entry ) { - $res_str .= "\nCreating DateFormatter with timezone_id = $timezone_id_entry"; - $fmt = ut_datefmt_create( "de-DE", DateFormatter::SHORT, DateFormatter::SHORT, $timezone_id_entry , DateFormatter::GREGORIAN ); + $res_str .= "\nCreating IntlDateFormatter with timezone_id = $timezone_id_entry"; + $fmt = ut_datefmt_create( "de-DE", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $timezone_id_entry , IntlDateFormatter::GREGORIAN ); $timezone_id = ut_datefmt_get_timezone_id( $fmt); $res_str .= "\nAfter call to get_timezone_id : timezone_id= $timezone_id"; $res_str .= "\n"; @@ -40,11 +40,11 @@ ut_run(); ?> --EXPECT-- -Creating DateFormatter with timezone_id = America/New_York +Creating IntlDateFormatter with timezone_id = America/New_York After call to get_timezone_id : timezone_id= America/New_York -Creating DateFormatter with timezone_id = America/Los_Angeles +Creating IntlDateFormatter with timezone_id = America/Los_Angeles After call to get_timezone_id : timezone_id= America/Los_Angeles -Creating DateFormatter with timezone_id = America/Dallas +Creating IntlDateFormatter with timezone_id = America/Dallas After call to get_timezone_id : timezone_id= America/Dallas http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_is_set_lenient.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_is_set_lenient.phpt diff -u pecl/intl/tests/dateformat_is_set_lenient.phpt:1.3 pecl/intl/tests/dateformat_is_set_lenient.phpt:1.4 --- pecl/intl/tests/dateformat_is_set_lenient.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_is_set_lenient.phpt Mon May 5 23:46:20 2008 @@ -18,8 +18,8 @@ $res_str = ''; //Create - $fmt = ut_datefmt_create( "en-US", DateFormatter::SHORT, DateFormatter::SHORT , 'America/New_York', DateFormatter::GREGORIAN ); - $res_str .= "\nDateFormatter Created.\n"; + $fmt = ut_datefmt_create( "en-US", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT , 'America/New_York', IntlDateFormatter::GREGORIAN ); + $res_str .= "\nIntlDateFormatter Created.\n"; $resLenient1 = ut_datefmt_is_lenient( $fmt); $res_str .= "After call to get_lenient : lenient= "; @@ -32,7 +32,7 @@ //Set and test $res_str .= "--------------------\n"; $isLenient = TRUE; - $res_str .= "Setting DateFormatter with lenient = "; + $res_str .= "Setting IntlDateFormatter with lenient = "; if( $isLenient){ $res_str .= "TRUE\n"; }else{ @@ -51,7 +51,7 @@ //Set and test $res_str .= "--------------------\n"; $isLenient = FALSE; - $res_str .= "Setting DateFormatter with lenient ="; + $res_str .= "Setting IntlDateFormatter with lenient ="; if( $isLenient){ $res_str .= "TRUE\n"; }else{ @@ -78,12 +78,12 @@ ut_run(); ?> --EXPECT-- -DateFormatter Created. +IntlDateFormatter Created. After call to get_lenient : lenient= TRUE -------------------- -Setting DateFormatter with lenient = TRUE +Setting IntlDateFormatter with lenient = TRUE After call to is_lenient : lenient= TRUE -------------------- -Setting DateFormatter with lenient =FALSE +Setting IntlDateFormatter with lenient =FALSE After call to is_lenient : lenient= FALSE -------------------- http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_localtime.phpt?r1=1.6&r2=1.7&diff_format=u Index: pecl/intl/tests/dateformat_localtime.phpt diff -u pecl/intl/tests/dateformat_localtime.phpt:1.6 pecl/intl/tests/dateformat_localtime.phpt:1.7 --- pecl/intl/tests/dateformat_localtime.phpt:1.6 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_localtime.phpt Mon May 5 23:46:20 2008 @@ -18,19 +18,19 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, ); $res_str = ''; @@ -43,9 +43,9 @@ "19691218 08:49 AM" ); - $fmt1 = ut_datefmt_create( 'en_US_CA', DateFormatter::LONG, DateFormatter::LONG); - $fmt2 = ut_datefmt_create( 'en_US_CA', DateFormatter::MEDIUM, DateFormatter::MEDIUM); - $fmt3 = ut_datefmt_create( 'en_US_CA', DateFormatter::FULL, DateFormatter::FULL); + $fmt1 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::LONG, IntlDateFormatter::LONG); + $fmt2 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM); + $fmt3 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::FULL, IntlDateFormatter::FULL); $fmt_array = array( $fmt1 , $fmt2 ,$fmt3 ); @@ -64,7 +64,7 @@ foreach( $fmt_array as $fmt_entry ){ $res_str .= "\n------------"; - $res_str .= "\nDateFormatter : ".$fmt_desc_array[$cnt]; + $res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt]; $cnt++; $parsed_arr = ut_datefmt_localtime( $fmt_entry , $text_entry , $parse_pos ); @@ -98,37 +98,37 @@ Input text is : Thursday, December 18, 1969 8:49:59 AM PST ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' , ------------------------------- Input text is : June 18, 1969 8:49:59 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '1' , ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL ------------------------------- Input text is : 12/18/69 8:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL ------------------------------- Input text is : 19691218 08:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG +IntlDateFormatter : DateType::LONG, TimeType::LONG ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_parse.phpt?r1=1.7&r2=1.8&diff_format=u Index: pecl/intl/tests/dateformat_parse.phpt diff -u pecl/intl/tests/dateformat_parse.phpt:1.7 pecl/intl/tests/dateformat_parse.phpt:1.8 --- pecl/intl/tests/dateformat_parse.phpt:1.7 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_parse.phpt Mon May 5 23:46:20 2008 @@ -18,11 +18,11 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; @@ -41,7 +41,7 @@ $parse_pos = 0; foreach( $text_arr as $text_entry){ for ( $parse_pos = 0 ; $parse_pos < strlen($text_entry) ; $parse_pos++ ){ - $fmt = ut_datefmt_create( 'en_US_CA', DateFormatter::NONE, DateFormatter::SHORT); + $fmt = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::NONE, IntlDateFormatter::SHORT); $parsed = ut_datefmt_parse( $fmt , $text_entry , $parse_pos ); if( intl_get_error_code() == U_ZERO_ERROR){ $res_str .= "\nInput text :$text_entry ; Parsed text : $parsed"; http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt diff -u pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt:1.4 pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt:1.5 --- pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_parse_localtime_parsepos.phpt Mon May 5 23:46:20 2008 @@ -18,9 +18,9 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, ); $res_str = ''; @@ -33,9 +33,9 @@ "19691218 08:49 AM" ); - $fmt1 = ut_datefmt_create( 'en_US_CA', DateFormatter::LONG, DateFormatter::LONG); - $fmt2 = ut_datefmt_create( 'en_US_CA', DateFormatter::MEDIUM, DateFormatter::MEDIUM); - $fmt3 = ut_datefmt_create( 'en_US_CA', DateFormatter::FULL, DateFormatter::FULL); + $fmt1 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::LONG, IntlDateFormatter::LONG); + $fmt2 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM); + $fmt3 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::FULL, IntlDateFormatter::FULL); $fmt_array = array( $fmt1 , $fmt2 ,$fmt3 ); @@ -51,7 +51,7 @@ $cnt =0; foreach( $fmt_array as $fmt_entry ){ $res_str .= "\n------------"; - $res_str .= "\nDateFormatter : ".$fmt_desc_array[$cnt]; + $res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt]; $cnt++; $parsed_arr = ut_datefmt_localtime( $fmt_entry , $text_entry); @@ -84,37 +84,37 @@ Input text is : Thursday, December 18, 1969 8:49:59 AM PST ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::FULL, TimeType::FULL +IntlDateFormatter : DateType::FULL, TimeType::FULL tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' , ------------------------------- Input text is : June 18, 1969 8:49:59 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '1' , ------------ -DateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' ------------------------------- Input text is : 12/18/69 8:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' ------------------------------- Input text is : 19691218 08:49 AM ------------ -DateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR' ------------ -DateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' +IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR' http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt?r1=1.4&r2=1.5&diff_format=u Index: pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt diff -u pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt:1.4 pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt:1.5 --- pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt:1.4 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_parse_timestamp_parsepos.phpt Mon May 5 23:46:20 2008 @@ -18,11 +18,11 @@ ); $datetype_arr = array ( - DateFormatter::FULL, - DateFormatter::LONG, - DateFormatter::MEDIUM, - DateFormatter::SHORT, - DateFormatter::NONE + IntlDateFormatter::FULL, + IntlDateFormatter::LONG, + IntlDateFormatter::MEDIUM, + IntlDateFormatter::SHORT, + IntlDateFormatter::NONE ); $res_str = ''; http://cvs.php.net/viewvc.cgi/pecl/intl/tests/dateformat_set_timezone_id.phpt?r1=1.3&r2=1.4&diff_format=u Index: pecl/intl/tests/dateformat_set_timezone_id.phpt diff -u pecl/intl/tests/dateformat_set_timezone_id.phpt:1.3 pecl/intl/tests/dateformat_set_timezone_id.phpt:1.4 --- pecl/intl/tests/dateformat_set_timezone_id.phpt:1.3 Mon May 5 22:37:13 2008 +++ pecl/intl/tests/dateformat_set_timezone_id.phpt Mon May 5 23:46:20 2008 @@ -23,7 +23,7 @@ $res_str = ''; - $fmt = ut_datefmt_create( "en_US", DateFormatter::FULL, DateFormatter::FULL, 'America/San_Francisco' , DateFormatter::GREGORIAN ); + $fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/San_Francisco' , IntlDateFormatter::GREGORIAN ); $timezone_id = ut_datefmt_get_timezone_id( $fmt ); $res_str .= "\nAfter creation of the dateformatter : timezone_id= $timezone_id\n";