diff options
author | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
commit | 2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch) | |
tree | 33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /ext/intl | |
parent | 3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff) | |
download | php-git-php-5.3.0alpha2.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
Diffstat (limited to 'ext/intl')
22 files changed, 473 insertions, 402 deletions
diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c index d064a2bd5d..df3c12cc5a 100755 --- a/ext/intl/collator/collator_class.c +++ b/ext/intl/collator/collator_class.c @@ -88,18 +88,22 @@ zend_object_value Collator_object_create( modify approptiate 'collator_XX_args' for the procedural API. */ +static ZEND_BEGIN_ARG_INFO_EX( collator_0_args, 0, 0, 0 ) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX( collator_1_arg, 0, 0, 1 ) ZEND_ARG_INFO( 0, arg1 ) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX( collator_2_args, 0, 0, 2 ) ZEND_ARG_INFO( 0, arg1 ) ZEND_ARG_INFO( 0, arg2 ) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX( collator_sort_args, 0, 0, 1 ) ZEND_ARG_ARRAY_INFO( 1, arr, 0 ) ZEND_ARG_INFO( 0, flags ) diff --git a/ext/intl/dateformat/dateformat.c b/ext/intl/dateformat/dateformat.c index 0eac9e9c7b..20e9d70887 100755 --- a/ext/intl/dateformat/dateformat.c +++ b/ext/intl/dateformat/dateformat.c @@ -75,7 +75,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) zval* object; long date_type = 0; long time_type = 0; - long calendar = UCAL_GREGORIAN; + long calendar = 1; char* timezone_str = NULL; int timezone_str_len = 0; char* pattern_str = NULL; @@ -91,7 +91,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) object = return_value; /* Parse parameters. */ if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "sll|sls", - &locale, &locale_len, &date_type, &time_type, &timezone_str, &timezone_str_len, &calendar,&pattern_str, &pattern_str_len ) == FAILURE ) + &locale, &locale_len, &date_type, & time_type , &timezone_str, &timezone_str_len , &calendar ,&pattern_str , &pattern_str_len ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: unable to parse input parameters", 0 TSRMLS_CC ); zval_dtor(return_value); @@ -117,14 +117,14 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) } if( pattern_str && pattern_str_len>0 ){ - DATE_FORMAT_OBJECT(dfo) = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, timezone_utf16, timezone_utf16_len, svalue, slength, &INTL_DATA_ERROR_CODE(dfo)); + DATE_FORMAT_OBJECT(dfo) = udat_open(UDAT_IGNORE,UDAT_IGNORE, locale, timezone_utf16, timezone_utf16_len ,svalue ,slength , &INTL_DATA_ERROR_CODE(dfo)); } else { - DATE_FORMAT_OBJECT(dfo) = udat_open(time_type, date_type, locale, timezone_utf16, timezone_utf16_len, svalue, slength, &INTL_DATA_ERROR_CODE(dfo)); + DATE_FORMAT_OBJECT(dfo) = udat_open(time_type,date_type, locale, timezone_utf16, timezone_utf16_len ,svalue ,slength , &INTL_DATA_ERROR_CODE(dfo)); } /* Set the calendar if passed */ if(!U_FAILURE(INTL_DATA_ERROR_CODE(dfo)) && calendar) { - ucal_obj = ucal_open( timezone_utf16, timezone_utf16_len, locale, calendar, &INTL_DATA_ERROR_CODE(dfo) ); + ucal_obj = ucal_open( timezone_utf16 , timezone_utf16_len , locale , calendar , &INTL_DATA_ERROR_CODE(dfo) ); if(!U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) { udat_setCalendar( DATE_FORMAT_OBJECT(dfo), ucal_obj ); } diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c index 51012896ed..717b44b1d6 100755 --- a/ext/intl/dateformat/dateformat_attr.c +++ b/ext/intl/dateformat/dateformat_attr.c @@ -26,10 +26,11 @@ #include <unicode/udat.h> #include <unicode/ucal.h> -static void internal_set_calendar(IntlDateFormatter_object *dfo, char* timezone_id, int timezone_id_len, int calendar, zval* return_value TSRMLS_DC){ +static void internal_set_calendar(IntlDateFormatter_object *dfo, 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 */ char* locale = NULL; + int locale_type =ULOC_ACTUAL_LOCALE; UCalendar* ucal_obj = NULL; @@ -42,14 +43,14 @@ static void internal_set_calendar(IntlDateFormatter_object *dfo, char* timezone_ } /* Convert timezone to UTF-16. */ - intl_convert_utf8_to_utf16(&timezone_utf16, &timezone_utf16_len, timezone_id, timezone_id_len, &INTL_DATA_ERROR_CODE(dfo)); + intl_convert_utf8_to_utf16(&timezone_utf16, &timezone_utf16_len, timezone_id, timezone_id_len , &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" ); - /* Get the locale for the dateformatter */ - locale = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), ULOC_ACTUAL_LOCALE, &INTL_DATA_ERROR_CODE(dfo)); + /* Get the lcoale for the dateformatter */ + locale = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), locale_type ,&INTL_DATA_ERROR_CODE(dfo)); /* Set the calendar if passed */ - ucal_obj = ucal_open(timezone_utf16, timezone_utf16_len, locale, calendar, &INTL_DATA_ERROR_CODE(dfo) ); + ucal_obj = ucal_open( timezone_utf16 , timezone_utf16_len , locale , calendar , &INTL_DATA_ERROR_CODE(dfo) ); udat_setCalendar( DATE_FORMAT_OBJECT(dfo), ucal_obj ); INTL_METHOD_CHECK_STATUS(dfo, "Error setting the calendar."); @@ -70,7 +71,7 @@ PHP_FUNCTION( datefmt_get_datetype ) /* Parse parameters. */ 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, + intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_datetype: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; } @@ -96,7 +97,7 @@ PHP_FUNCTION( datefmt_get_timetype ) /* Parse parameters. */ 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, + intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timetype: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; } @@ -123,7 +124,7 @@ PHP_FUNCTION( datefmt_get_calendar ) /* Parse parameters. */ 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, + intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_calendar: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; } @@ -133,7 +134,7 @@ PHP_FUNCTION( datefmt_get_calendar ) INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter calendar." ); - RETURN_LONG(dfo->calendar); + RETURN_LONG(dfo->calendar ); } /* }}} */ @@ -149,7 +150,7 @@ PHP_FUNCTION( datefmt_get_timezone_id ) /* Parse parameters. */ 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, + intl_error_set( NULL , U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timezone_id: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; } @@ -160,7 +161,7 @@ PHP_FUNCTION( datefmt_get_timezone_id ) INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter timezone_id." ); if( dfo->timezone_id ){ - RETURN_STRING((char*)dfo->timezone_id, TRUE ); + RETURN_STRING((char*)dfo->timezone_id ,TRUE ); }else{ RETURN_NULL(); } @@ -168,7 +169,7 @@ PHP_FUNCTION( datefmt_get_timezone_id ) /* {{{ proto boolean IntlDateFormatter::setTimeZoneId( $timezone_id) * Set formatter timezone_id. }}} */ -/* {{{ proto boolean datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id) +/* {{{ proto boolean datefmt_set_timezone_id( IntlDateFormatter $mf ,$timezone_id) * Set formatter timezone_id. */ PHP_FUNCTION( datefmt_set_timezone_id ) @@ -179,7 +180,7 @@ PHP_FUNCTION( datefmt_set_timezone_id ) DATE_FORMAT_METHOD_INIT_VARS; /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &object, IntlDateFormatter_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 ); @@ -190,13 +191,13 @@ PHP_FUNCTION( datefmt_set_timezone_id ) DATE_FORMAT_METHOD_FETCH_OBJECT; /* set the timezone for the calendar */ - internal_set_calendar( dfo, timezone_id, timezone_id_len, dfo->calendar, return_value TSRMLS_CC ); + internal_set_calendar( dfo , timezone_id , timezone_id_len , dfo->calendar ,return_value TSRMLS_CC ); /* Set the IntlDateFormatter variable */ if( dfo->timezone_id ){ efree(dfo->timezone_id); } - dfo->timezone_id = estrndup(timezone_id, timezone_id_len); + dfo->timezone_id = estrndup(timezone_id , timezone_id_len); RETURN_TRUE; } @@ -231,7 +232,7 @@ PHP_FUNCTION( datefmt_get_pattern ) ++length; /* to avoid U_STRING_NOT_TERMINATED_WARNING */ INTL_DATA_ERROR_CODE(dfo) = U_ZERO_ERROR; value = eumalloc(length); - length = udat_toPattern(DATE_FORMAT_OBJECT(dfo), is_pattern_localized, value, length, &INTL_DATA_ERROR_CODE(dfo) ); + length = udat_toPattern(DATE_FORMAT_OBJECT(dfo), is_pattern_localized , value, length, &INTL_DATA_ERROR_CODE(dfo) ); if(U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) { efree(value); value = value_buf; @@ -274,7 +275,7 @@ PHP_FUNCTION( datefmt_set_pattern ) intl_convert_utf8_to_utf16(&svalue, &slength, value, value_len, &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS(dfo, "Error converting pattern to UTF-16" ); - udat_applyPattern(DATE_FORMAT_OBJECT(dfo), (UBool)is_pattern_localized, svalue, slength); + udat_applyPattern(DATE_FORMAT_OBJECT(dfo), (UBool)is_pattern_localized , svalue, slength); efree(svalue); INTL_METHOD_CHECK_STATUS(dfo, "Error setting symbol value"); @@ -297,7 +298,7 @@ PHP_FUNCTION( datefmt_get_locale ) /* Parse parameters. */ if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", - &object, IntlDateFormatter_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 ); @@ -308,7 +309,7 @@ PHP_FUNCTION( datefmt_get_locale ) /* Fetch the object. */ DATE_FORMAT_METHOD_FETCH_OBJECT; - loc = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), loc_type,&INTL_DATA_ERROR_CODE(dfo)); + loc = (char *)udat_getLocaleByType(DATE_FORMAT_OBJECT(dfo), loc_type ,&INTL_DATA_ERROR_CODE(dfo)); RETURN_STRING(loc, 1); } /* }}} */ @@ -353,7 +354,7 @@ PHP_FUNCTION( datefmt_set_lenient ) /* Parse parameters. */ if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ob", - &object, IntlDateFormatter_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 ); @@ -363,7 +364,7 @@ PHP_FUNCTION( datefmt_set_lenient ) /* Fetch the object. */ DATE_FORMAT_METHOD_FETCH_OBJECT; - udat_setLenient(DATE_FORMAT_OBJECT(dfo), (UBool)isLenient ); + udat_setLenient(DATE_FORMAT_OBJECT(dfo) , (UBool)isLenient ); } /* }}} */ @@ -396,10 +397,10 @@ PHP_FUNCTION( datefmt_set_calendar ) DATE_FORMAT_METHOD_FETCH_OBJECT; - internal_set_calendar( dfo, dfo->timezone_id, strlen(dfo->timezone_id), calendar, return_value TSRMLS_CC ); + internal_set_calendar( dfo , dfo->timezone_id , strlen(dfo->timezone_id) , calendar ,return_value TSRMLS_CC ); /* Set the calendar value in the IntlDateFormatter object */ - dfo->calendar = calendar; + dfo->calendar = calendar ; RETURN_TRUE; } diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c index 7df95816e2..7ee38c47fe 100755 --- a/ext/intl/dateformat/dateformat_class.c +++ b/ext/intl/dateformat/dateformat_class.c @@ -84,35 +84,42 @@ zend_object_value IntlDateFormatter_object_create(zend_class_entry *ce TSRMLS_DC */ /* {{{ arginfo */ -ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 1) +static ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 1) ZEND_ARG_INFO(0, string) ZEND_ARG_INFO(1, position) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_format, 0, 0, 0) ZEND_ARG_INFO(0, args) ZEND_ARG_INFO(0, array) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO(arginfo_intldateformatter_getdatetype, 0) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_settimezoneid, 0, 0, 1) ZEND_ARG_INFO(0, zone) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setpattern, 0, 0, 1) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setlenient, 0, 0, 1) ZEND_ARG_INFO(0, lenient) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter_setcalendar, 0, 0, 1) ZEND_ARG_INFO(0, which) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_intldateformatter___construct, 0, 0, 3) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, datetype) diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c index e41b38beb1..f56a397ea0 100755 --- a/ext/intl/dateformat/dateformat_format.c +++ b/ext/intl/dateformat/dateformat_format.c @@ -31,8 +31,7 @@ /* {{{ * Internal function which calls the udat_format */ -static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval *return_value TSRMLS_DC) -{ +static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp , zval *return_value TSRMLS_DC){ UChar* formatted = NULL; int32_t resultlengthneeded =0 ; @@ -58,12 +57,11 @@ static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval /* {{{ * Internal function which fetches an element from the passed array for the key_name passed */ -static double internal_get_arr_ele(IntlDateFormatter_object *dfo, HashTable* hash_arr, char* key_name TSRMLS_DC) -{ +static double internal_get_arr_ele(IntlDateFormatter_object *dfo , HashTable* hash_arr ,char* key_name TSRMLS_DC){ zval** ele_value = NULL; UDate result = -1; - if( zend_hash_find( hash_arr, key_name, strlen(key_name) + 1, (void **)&ele_value ) == SUCCESS ){ + if( zend_hash_find( hash_arr , key_name , strlen(key_name) + 1 ,(void **)&ele_value ) == SUCCESS ){ if( Z_TYPE_PP(ele_value)!= IS_LONG ){ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: parameter array does not contain a long element.", 0 TSRMLS_CC ); @@ -71,16 +69,15 @@ static double internal_get_arr_ele(IntlDateFormatter_object *dfo, HashTable* has result = Z_LVAL_PP(ele_value); } } - /* printf("\n Inside internal_get_arr_ele key_name= %s, result = %g \n", key_name, result); */ + /* printf("\n Inside internal_get_arr_ele key_name= %s , result = %g \n" , key_name, result); */ return result; } /* }}} */ /* {{{ - * Internal function which sets UCalendar from the passed array and retrieves timestamp + * Internal function which creates a UCalendar from the passed array */ -static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, HashTable* hash_arr TSRMLS_DC) -{ +static void internal_create_ucal(IntlDateFormatter_object *dfo, HashTable* hash_arr , UCalendar* pcal TSRMLS_DC){ long year =0; long month =0; long hour =0; @@ -90,30 +87,31 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, HashTable* ha long yday =0; long mday =0; UBool isInDST = FALSE; - UCalendar *pcal; /* Fetch values from the incoming array */ - year = internal_get_arr_ele( dfo, hash_arr, CALENDAR_YEAR TSRMLS_CC) + 1900; /* tm_year is years since 1900 */ + year = internal_get_arr_ele( dfo , hash_arr , CALENDAR_YEAR TSRMLS_CC) + 1900; /* tm_year is years since 1900 */ /* Month in ICU and PHP starts from January =0 */ - month = internal_get_arr_ele( dfo, hash_arr, CALENDAR_MON TSRMLS_CC); - hour = internal_get_arr_ele( dfo, hash_arr, CALENDAR_HOUR TSRMLS_CC); - minute = internal_get_arr_ele( dfo, hash_arr, CALENDAR_MIN TSRMLS_CC); - second = internal_get_arr_ele( dfo, hash_arr, CALENDAR_SEC TSRMLS_CC); - wday = internal_get_arr_ele( dfo, hash_arr, CALENDAR_WDAY TSRMLS_CC); - yday = internal_get_arr_ele( dfo, hash_arr, CALENDAR_YDAY TSRMLS_CC); - isInDST = internal_get_arr_ele( dfo, hash_arr, CALENDAR_ISDST TSRMLS_CC); - /* For the ucal_setDateTime() function, this is the 'date' value */ - mday = internal_get_arr_ele( dfo, hash_arr, CALENDAR_MDAY TSRMLS_CC); - - pcal = udat_getCalendar(DATE_FORMAT_OBJECT(dfo)); + month = internal_get_arr_ele( dfo , hash_arr , CALENDAR_MON TSRMLS_CC); + hour = internal_get_arr_ele( dfo , hash_arr , CALENDAR_HOUR TSRMLS_CC); + minute = internal_get_arr_ele( dfo , hash_arr , CALENDAR_MIN TSRMLS_CC); + second = internal_get_arr_ele( dfo , hash_arr , CALENDAR_SEC TSRMLS_CC); + wday = internal_get_arr_ele( dfo , hash_arr , CALENDAR_WDAY TSRMLS_CC); + yday = internal_get_arr_ele( dfo , hash_arr , CALENDAR_YDAY TSRMLS_CC); + isInDST = internal_get_arr_ele( dfo , hash_arr , CALENDAR_ISDST TSRMLS_CC); + /* For the ucal_setDateTime() function , this is the 'date' value */ + mday = internal_get_arr_ele( dfo , hash_arr , CALENDAR_MDAY TSRMLS_CC); + /* set the incoming values for the calendar */ - ucal_setDateTime( pcal, year, month, mday, hour, minute, second, &INTL_DATA_ERROR_CODE(dfo)); + ucal_setDateTime( pcal, year, month , mday , hour , minute , second , &INTL_DATA_ERROR_CODE(dfo)); if( INTL_DATA_ERROR_CODE(dfo) != U_ZERO_ERROR){ - return 0; + return; } + /* ICU UCAL_DAY_OF_WEEK starts from SUNDAY=1 thru SATURDAY=7 + * whereas PHP localtime has tm_wday SUNDAY=0 thru SATURDAY=6 */ + ucal_set( pcal, UCAL_DAY_OF_WEEK , (wday+1)); + ucal_set( pcal, UCAL_DAY_OF_YEAR , yday); - /* Fetch the timestamp from the UCalendar */ - return ucal_getMillis(pcal, &INTL_DATA_ERROR_CODE(dfo) ); + /* TO DO: How to set the isInDST field?Is it required to set */ } @@ -125,13 +123,14 @@ PHP_FUNCTION(datefmt_format) { UDate timestamp =0; UDate p_timestamp =0; + UCalendar* temp_cal ; HashTable* hash_arr = NULL; zval* zarg = NULL; DATE_FORMAT_METHOD_INIT_VARS; /* Parse parameters. */ - if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz", &object, IntlDateFormatter_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 ); RETURN_FALSE; @@ -154,17 +153,27 @@ PHP_FUNCTION(datefmt_format) hash_arr = Z_ARRVAL_P(zarg); if( !hash_arr || zend_hash_num_elements( hash_arr ) == 0 ) RETURN_FALSE; - - timestamp = internal_get_timestamp(dfo, hash_arr TSRMLS_CC); + /* Create a UCalendar object from the array and then format it */ + temp_cal = ucal_open(NULL, -1, NULL, UCAL_GREGORIAN, &INTL_DATA_ERROR_CODE(dfo)); + ucal_clear(temp_cal); + INTL_METHOD_CHECK_STATUS( dfo, "datefmt_format: Date formatting failed while creating calendar from the array" ) + internal_create_ucal( dfo , hash_arr , temp_cal TSRMLS_CC); + INTL_METHOD_CHECK_STATUS( dfo, "datefmt_format: Date formatting failed while creating calendar from the array" ) + /* Fetch the timestamp from the created UCalendar */ + timestamp = ucal_getMillis(temp_cal , &INTL_DATA_ERROR_CODE(dfo) ); INTL_METHOD_CHECK_STATUS( dfo, "datefmt_format: Date formatting failed" ) break; +/* + case IS_OBJECT: + break; +*/ default: intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, - "datefmt_format: takes either an array or an integer timestamp value ", 0 TSRMLS_CC ); + "datefmt_format: takes either an array or an integer TimeStamp value ", 0 TSRMLS_CC ); RETURN_FALSE; } - internal_format( dfo, timestamp, return_value TSRMLS_CC); + internal_format( dfo, timestamp ,return_value TSRMLS_CC); } diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index c17089f1ca..3e05050760 100755 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -33,18 +33,17 @@ * 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(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t text_len, int32_t *parse_pos, zval *return_value TSRMLS_DC) -{ +static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* text_to_parse , int32_t text_len, int32_t *parse_pos , zval *return_value TSRMLS_DC){ long result = 0; UDate timestamp =0; UChar* text_utf16 = NULL; int32_t text_utf16_len = 0; /* Convert timezone to UTF-16. */ - intl_convert_utf8_to_utf16(&text_utf16, &text_utf16_len, text_to_parse, text_len, &INTL_DATA_ERROR_CODE(dfo)); + intl_convert_utf8_to_utf16(&text_utf16 , &text_utf16_len , text_to_parse , text_len, &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" ); - timestamp = udat_parse( DATE_FORMAT_OBJECT(dfo), text_utf16, text_utf16_len, parse_pos, &INTL_DATA_ERROR_CODE(dfo)); + timestamp = udat_parse( DATE_FORMAT_OBJECT(dfo), text_utf16 , text_utf16_len , parse_pos , &INTL_DATA_ERROR_CODE(dfo)); if( text_utf16 ){ efree(text_utf16); } @@ -61,38 +60,36 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex } /* }}} */ -static void add_to_localtime_arr( IntlDateFormatter_object *dfo, 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(dfo)); +static void add_to_localtime_arr( IntlDateFormatter_object *dfo, 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(dfo)); INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : could not get a field from calendar" ); - if( strcmp(key_name, CALENDAR_YEAR )==0 ){ + if( strcmp(key_name , CALENDAR_YEAR )==0 ){ /* since tm_year is years from 1900 */ - add_assoc_long( return_value, key_name,( calendar_field_val-1900) ); - }else if( strcmp(key_name, CALENDAR_WDAY )==0 ){ + add_assoc_long( return_value, key_name ,( calendar_field_val-1900) ); + }else if( strcmp(key_name , CALENDAR_WDAY )==0 ){ /* since tm_wday starts from 0 whereas ICU WDAY start from 1 */ - add_assoc_long( return_value, key_name,( calendar_field_val-1) ); + add_assoc_long( return_value, key_name ,( calendar_field_val-1) ); }else{ - add_assoc_long( return_value, key_name, calendar_field_val ); + add_assoc_long( return_value, key_name , calendar_field_val ); } } /* {{{ * Internal function which calls the udat_parseCalendar */ -static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t text_len, int32_t *parse_pos, zval *return_value TSRMLS_DC) -{ +static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse , int32_t text_len, int32_t *parse_pos , zval *return_value TSRMLS_DC){ UCalendar* parsed_calendar = NULL; UChar* text_utf16 = NULL; int32_t text_utf16_len = 0; long isInDST = 0; /* Convert timezone to UTF-16. */ - intl_convert_utf8_to_utf16(&text_utf16, &text_utf16_len, text_to_parse, text_len, &INTL_DATA_ERROR_CODE(dfo)); + intl_convert_utf8_to_utf16(&text_utf16 , &text_utf16_len , text_to_parse , text_len, &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS(dfo, "Error converting timezone to UTF-16" ); - parsed_calendar = udat_getCalendar(DATE_FORMAT_OBJECT(dfo)); - udat_parseCalendar( DATE_FORMAT_OBJECT(dfo), parsed_calendar, text_utf16, text_utf16_len, parse_pos, &INTL_DATA_ERROR_CODE(dfo)); + parsed_calendar = ucal_open(NULL, -1, NULL, UCAL_GREGORIAN, &INTL_DATA_ERROR_CODE(dfo)); + udat_parseCalendar( DATE_FORMAT_OBJECT(dfo), parsed_calendar , text_utf16 , text_utf16_len , parse_pos , &INTL_DATA_ERROR_CODE(dfo)); if (text_utf16) { efree(text_utf16); @@ -103,19 +100,19 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex array_init( return_value ); /* Add entries from various fields of the obtained parsed_calendar */ - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_SECOND, CALENDAR_SEC TSRMLS_CC); - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_MINUTE, CALENDAR_MIN TSRMLS_CC); - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_HOUR_OF_DAY, CALENDAR_HOUR TSRMLS_CC); - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_YEAR, CALENDAR_YEAR TSRMLS_CC); - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_MONTH, CALENDAR_MDAY TSRMLS_CC); - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_WEEK, CALENDAR_WDAY TSRMLS_CC); - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_YEAR, CALENDAR_YDAY TSRMLS_CC); - add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_MONTH, CALENDAR_MON TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_SECOND , CALENDAR_SEC TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_MINUTE , CALENDAR_MIN TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_HOUR_OF_DAY , CALENDAR_HOUR TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_YEAR , CALENDAR_YEAR TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_DAY_OF_MONTH , CALENDAR_MDAY TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_DAY_OF_WEEK , CALENDAR_WDAY TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_DAY_OF_YEAR , CALENDAR_YDAY TSRMLS_CC); + add_to_localtime_arr( dfo , return_value , parsed_calendar , UCAL_MONTH , CALENDAR_MON TSRMLS_CC); /* Is in DST? */ - isInDST = ucal_inDaylightTime(parsed_calendar , &INTL_DATA_ERROR_CODE(dfo)); + isInDST = ucal_inDaylightTime(parsed_calendar , &INTL_DATA_ERROR_CODE(dfo)); INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : while checking if currently in DST." ); - add_assoc_long( return_value, CALENDAR_ISDST,(isInDST==1?1:0)); + add_assoc_long( return_value, CALENDAR_ISDST ,(isInDST==1?1:0)); } /* }}} */ @@ -135,7 +132,7 @@ PHP_FUNCTION(datefmt_parse) /* Parse parameters. */ if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z!", - &object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){ + &object, IntlDateFormatter_ce_ptr, &text_to_parse , &text_len , &z_parse_pos ) == FAILURE ){ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; } @@ -150,7 +147,7 @@ PHP_FUNCTION(datefmt_parse) RETURN_FALSE; } } - internal_parse_to_timestamp( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value TSRMLS_CC); + internal_parse_to_timestamp( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value TSRMLS_CC); if(z_parse_pos) { zval_dtor(z_parse_pos); ZVAL_LONG(z_parse_pos, parse_pos); @@ -173,7 +170,7 @@ PHP_FUNCTION(datefmt_localtime) /* Parse parameters. */ if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z!", - &object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){ + &object, IntlDateFormatter_ce_ptr, &text_to_parse , &text_len , &z_parse_pos ) == FAILURE ){ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse_to_localtime: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; } @@ -188,7 +185,7 @@ PHP_FUNCTION(datefmt_localtime) RETURN_FALSE; } } - internal_parse_to_localtime( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value TSRMLS_CC); + internal_parse_to_localtime( dfo, text_to_parse , text_len , z_parse_pos?&parse_pos:NULL, return_value TSRMLS_CC); if(z_parse_pos) { zval_dtor(z_parse_pos); ZVAL_LONG(z_parse_pos, parse_pos); diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c index a6f45108ea..032a5a8d73 100755 --- a/ext/intl/formatter/formatter_class.c +++ b/ext/intl/formatter/formatter_class.c @@ -80,54 +80,63 @@ zend_object_value NumberFormatter_object_create( */ /* {{{ arginfo */ -ZEND_BEGIN_ARG_INFO_EX(number_parse_arginfo, 0, 0, 1) +static ZEND_BEGIN_ARG_INFO_EX(number_parse_arginfo, 0, 0, 1) ZEND_ARG_INFO(0, string) ZEND_ARG_INFO(0, type) ZEND_ARG_INFO(1, position) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(number_parse_currency_arginfo, 0, 0, 2) +static ZEND_BEGIN_ARG_INFO_EX(number_parse_currency_arginfo, 0, 0, 2) ZEND_ARG_INFO(0, string) ZEND_ARG_INFO(1, currency) ZEND_ARG_INFO(1, position) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_getattribute, 0, 0, 1) ZEND_ARG_INFO(0, attr) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_setattribute, 0, 0, 2) ZEND_ARG_INFO(0, attr) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_setsymbol, 0, 0, 2) ZEND_ARG_INFO(0, attr) ZEND_ARG_INFO(0, symbol) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO(arginfo_numberformatter_getpattern, 0) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_setpattern, 0, 0, 1) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_getlocale, 0, 0, 0) ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter___construct, 0, 0, 2) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, style) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_formatcurrency, 0, 0, 2) ZEND_ARG_INFO(0, num) ZEND_ARG_INFO(0, currency) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numberformatter_format, 0, 0, 1) ZEND_ARG_INFO(0, num) ZEND_ARG_INFO(0, type) diff --git a/ext/intl/locale/locale_class.c b/ext/intl/locale/locale_class.c index 8a9efbd832..7814eb48ca 100755 --- a/ext/intl/locale/locale_class.c +++ b/ext/intl/locale/locale_class.c @@ -35,24 +35,29 @@ zend_class_entry *Locale_ce_ptr = NULL; * approptiate 'locale_XX_args' for the procedural API! */ +static ZEND_BEGIN_ARG_INFO_EX( locale_0_args, 0, 0, 0 ) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX( locale_1_arg, 0, 0, 1 ) ZEND_ARG_INFO( 0, arg1 ) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX( locale_2_args, 0, 0, 2 ) ZEND_ARG_INFO( 0, arg1 ) ZEND_ARG_INFO( 0, arg2 ) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX( locale_3_args, 0, 0, 3 ) ZEND_ARG_INFO( 0, arg1 ) ZEND_ARG_INFO( 0, arg2 ) ZEND_ARG_INFO( 0, arg3 ) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX( locale_4_args, 0, 0, 4 ) ZEND_ARG_INFO( 0, arg1 ) ZEND_ARG_INFO( 0, arg2 ) diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c index b710ee7086..63af20b5eb 100755 --- a/ext/intl/msgformat/msgformat_class.c +++ b/ext/intl/msgformat/msgformat_class.c @@ -77,28 +77,34 @@ zend_object_value MessageFormatter_object_create(zend_class_entry *ce TSRMLS_DC) */ /* {{{ arginfo */ +static ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter___construct, 0, 0, 2) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO(arginfo_messageformatter_geterrormessage, 0) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_formatmessage, 0, 0, 3) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, pattern) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_format, 0, 0, 1) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_setpattern, 0, 0, 1) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_messageformatter_parse, 0, 0, 1) ZEND_ARG_INFO(0, source) ZEND_END_ARG_INFO() diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index 1895de2c86..8b7c8e6f87 100755 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -20,7 +20,6 @@ #include <math.h> #include <unicode/msgfmt.h> -#include <unicode/chariter.h> extern "C" { #include "php_intl.h" diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c index 75894fffc3..6a774ab5fb 100755 --- a/ext/intl/normalizer/normalizer_class.c +++ b/ext/intl/normalizer/normalizer_class.c @@ -29,6 +29,7 @@ zend_class_entry *Normalizer_ce_ptr = NULL; /* {{{ Normalizer methods arguments info */ +static ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 ) ZEND_ARG_INFO( 0, arg1 ) ZEND_ARG_INFO( 0, arg2 ) diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 889250bdb9..8daa262681 100755 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -84,39 +84,47 @@ ZEND_DECLARE_MODULE_GLOBALS( intl ) /* {{{ Arguments info */ +static ZEND_BEGIN_ARG_INFO_EX(collator_static_0_args, 0, 0, 0) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(collator_static_1_arg, 0, 0, 1) ZEND_ARG_INFO(0, arg1) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(collator_static_2_args, 0, 0, 2) ZEND_ARG_INFO(0, arg1) ZEND_ARG_INFO(0, arg2) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(collator_0_args, 0, 0, 1) ZEND_ARG_OBJ_INFO(0, object, Collator, 0) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(collator_1_arg, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, object, Collator, 0) ZEND_ARG_INFO(0, arg1) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(collator_2_args, 0, 0, 3) ZEND_ARG_OBJ_INFO(0, object, Collator, 0) ZEND_ARG_INFO(0, arg1) ZEND_ARG_INFO(0, arg2) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(collator_sort_args, 0, 0, 2) ZEND_ARG_OBJ_INFO(0, object, Collator, 0) ZEND_ARG_ARRAY_INFO(1, arr, 0) ZEND_ARG_INFO(0, sort_flags) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_arginfo, 0, 0, 2) ZEND_ARG_INFO(0, formatter) ZEND_ARG_INFO(0, string) @@ -124,6 +132,7 @@ ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_arginfo, 0, 0, 2) ZEND_ARG_INFO(1, position) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_currency_arginfo, 0, 0, 3) ZEND_ARG_INFO(0, formatter) ZEND_ARG_INFO(0, string) @@ -131,24 +140,29 @@ ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_currency_arginfo, 0, 0, 3) ZEND_ARG_INFO(1, position) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(locale_0_args, 0, 0, 0) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(locale_1_arg, 0, 0, 1) ZEND_ARG_INFO(0, arg1) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(locale_2_args, 0, 0, 2) ZEND_ARG_INFO(0, arg1) ZEND_ARG_INFO(0, arg2) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(locale_3_args, 0, 0, 3) ZEND_ARG_INFO(0, arg1) ZEND_ARG_INFO(0, arg2) ZEND_ARG_INFO(0, arg3) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(locale_4_args, 0, 0, 4) ZEND_ARG_INFO(0, arg1) ZEND_ARG_INFO(0, arg2) @@ -159,33 +173,39 @@ ZEND_END_ARG_INFO() #define intl_0_args collator_static_0_args #define intl_1_arg collator_static_1_arg +static ZEND_BEGIN_ARG_INFO_EX(normalizer_args, 0, 0, 1) ZEND_ARG_INFO(0, input) ZEND_ARG_INFO(0, form) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(grapheme_1_arg, 0, 0, 1) ZEND_ARG_INFO(0, string) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(grapheme_search_args, 0, 0, 2) ZEND_ARG_INFO(0, haystack) ZEND_ARG_INFO(0, needle) ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(grapheme_substr_args, 0, 0, 2) ZEND_ARG_INFO(0, string) ZEND_ARG_INFO(0, start) ZEND_ARG_INFO(0, length) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(grapheme_strstr_args, 0, 0, 2) ZEND_ARG_INFO(0, haystack) ZEND_ARG_INFO(0, needle) ZEND_ARG_INFO(0, before_needle) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(grapheme_extract_args, 0, 0, 2) ZEND_ARG_INFO(0, arg1) ZEND_ARG_INFO(0, arg2) @@ -194,120 +214,143 @@ ZEND_BEGIN_ARG_INFO_EX(grapheme_extract_args, 0, 0, 2) ZEND_ARG_INFO(1, arg5) /* 1 = pass by reference */ ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(datefmt_parse_args, 0, 0, 2) ZEND_ARG_INFO(0, formatter) ZEND_ARG_INFO(0, string) ZEND_ARG_INFO(1, position) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_create, 0, 0, 2) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, style) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_get_error_code, 0, 0, 1) ZEND_ARG_INFO(0, nf) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_format, 0, 0, 2) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, num) ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_format_currency, 0, 0, 3) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, num) ZEND_ARG_INFO(0, currency) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_get_attribute, 0, 0, 2) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, attr) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_set_attribute, 0, 0, 3) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, attr) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_set_symbol, 0, 0, 3) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, attr) ZEND_ARG_INFO(0, symbol) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_set_pattern, 0, 0, 2) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_get_locale, 0, 0, 1) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, type) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_create, 0, 0, 2) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_error_code, 0, 0, 1) ZEND_ARG_INFO(0, nf) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_error_message, 0, 0, 1) ZEND_ARG_INFO(0, coll) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_format, 0, 0, 2) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_format_message, 0, 0, 3) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, pattern) ZEND_ARG_INFO(0, args) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_parse, 0, 0, 2) ZEND_ARG_INFO(0, nf) ZEND_ARG_INFO(0, source) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_numfmt_parse_message, 0, 0, 3) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, pattern) ZEND_ARG_INFO(0, source) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_set_pattern, 0, 0, 2) ZEND_ARG_INFO(0, mf) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_msgfmt_get_locale, 0, 0, 1) ZEND_ARG_INFO(0, mf) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_pattern, 0, 0, 2) ZEND_ARG_INFO(0, mf) ZEND_ARG_INFO(0, pattern) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_set_calendar, 0, 0, 2) ZEND_ARG_INFO(0, mf) ZEND_ARG_INFO(0, calendar) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_format, 0, 0, 0) ZEND_ARG_INFO(0, args) ZEND_ARG_INFO(0, array) ZEND_END_ARG_INFO() +static ZEND_BEGIN_ARG_INFO_EX(arginfo_datefmt_create, 0, 0, 3) ZEND_ARG_INFO(0, locale) ZEND_ARG_INFO(0, date_type) diff --git a/ext/intl/tests/dateformat_format.phpt b/ext/intl/tests/dateformat_format.phpt index c4fed041d9..e110c6d151 100755 --- a/ext/intl/tests/dateformat_format.phpt +++ b/ext/intl/tests/dateformat_format.phpt @@ -12,8 +12,6 @@ datefmt_format_code() function ut_main() { - $timezone = 'GMT-10'; - $locale_arr = array ( 'en_US' ); @@ -47,22 +45,31 @@ function ut_main() 'tm_mday' => 3, 'tm_mon' => 3, 'tm_year' => 105, + 'tm_wday' => 0, + 'tm_yday' => 93, + 'tm_isdst' => 1 ); $localtime_arr2 = array ( - 'tm_sec' => 21, - 'tm_min' => 5, - 'tm_hour' => 7, - 'tm_mday' => 13, - 'tm_mon' => 4, + '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 ); $localtime_arr3 = array ( - 'tm_sec' => 11, - 'tm_min' => 13, - 'tm_hour' => 0, - 'tm_mday' => 17, - 'tm_mon' => 11, - 'tm_year' => -5 + '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 ); $localtime_arr = array ( @@ -80,7 +87,9 @@ function ut_main() foreach( $datetype_arr as $datetype_entry ) { $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN); + //$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"; } @@ -100,7 +109,7 @@ function ut_main() foreach( $datetype_arr as $datetype_entry ) { $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN ); + $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){ $res_str .= "\nFormatted localtime_array is : $formatted1"; @@ -127,129 +136,129 @@ Input timestamp is : 0 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Wednesday, December 31, 1969 2:00:00 PM GMT-10:00 +Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : December 31, 1969 2:00:00 PM GMT-10:00 +Formatted timestamp is : December 31, 1969 4:00:00 PM PST IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Dec 31, 1969 2:00:00 PM +Formatted timestamp is : Dec 31, 1969 4:00:00 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 12/31/69 2:00 PM +Formatted timestamp is : 12/31/69 4:00 PM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 19691231 02:00 PM +Formatted timestamp is : 19691231 04:00 PM ------------ Input timestamp is : -1200000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Wednesday, December 17, 1969 4:40:00 PM GMT-10:00 +Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : December 17, 1969 4:40:00 PM GMT-10:00 +Formatted timestamp is : December 17, 1969 6:40:00 PM PST IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Dec 17, 1969 4:40:00 PM +Formatted timestamp is : Dec 17, 1969 6:40:00 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 12/17/69 4:40 PM +Formatted timestamp is : 12/17/69 6:40 PM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 19691217 04:40 PM +Formatted timestamp is : 19691217 06:40 PM ------------ Input timestamp is : 1200000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Wednesday, January 14, 1970 11:20:00 AM GMT-10:00 +Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : January 14, 1970 11:20:00 AM GMT-10:00 +Formatted timestamp is : January 14, 1970 1:20:00 PM PST IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Jan 14, 1970 11:20:00 AM +Formatted timestamp is : Jan 14, 1970 1:20:00 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 1/14/70 11:20 AM +Formatted timestamp is : 1/14/70 1:20 PM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 19700114 11:20 AM +Formatted timestamp is : 19700114 01:20 PM ------------ Input timestamp is : 2200000000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Sunday, September 18, 2039 1:06:40 PM GMT-10:00 +Formatted timestamp is : Sunday, September 18, 2039 4:06:40 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : September 18, 2039 1:06:40 PM GMT-10:00 +Formatted timestamp is : September 18, 2039 4:06:40 PM PDT IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Sep 18, 2039 1:06:40 PM +Formatted timestamp is : Sep 18, 2039 4:06:40 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 9/18/39 1:06 PM +Formatted timestamp is : 9/18/39 4:06 PM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 20390918 01:06 PM +Formatted timestamp is : 20390918 04:06 PM ------------ Input timestamp is : -2200000000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Saturday, April 14, 1900 2:53:20 PM GMT-10:00 +Formatted timestamp is : Saturday, April 14, 1900 5:53:20 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : April 14, 1900 2:53:20 PM GMT-10:00 +Formatted timestamp is : April 14, 1900 5:53:20 PM PDT IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Apr 14, 1900 2:53:20 PM +Formatted timestamp is : Apr 14, 1900 5:53:20 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 4/14/00 2:53 PM +Formatted timestamp is : 4/14/00 5:53 PM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 19000414 02:53 PM +Formatted timestamp is : 19000414 05:53 PM ------------ Input timestamp is : 90099999 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Wednesday, November 8, 1972 9:46:39 AM GMT-10:00 +Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : November 8, 1972 9:46:39 AM GMT-10:00 +Formatted timestamp is : November 8, 1972 11:46:39 AM PST IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Nov 8, 1972 9:46:39 AM +Formatted timestamp is : Nov 8, 1972 11:46:39 AM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 11/8/72 9:46 AM +Formatted timestamp is : 11/8/72 11:46 AM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 19721108 09:46 AM +Formatted timestamp is : 19721108 11:46 AM ------------ Input timestamp is : 3600 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM GMT-10:00 +Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : December 31, 1969 3:00:00 PM GMT-10:00 +Formatted timestamp is : December 31, 1969 5:00:00 PM PST IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Dec 31, 1969 3:00:00 PM +Formatted timestamp is : Dec 31, 1969 5:00:00 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 12/31/69 3:00 PM +Formatted timestamp is : 12/31/69 5:00 PM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 19691231 03:00 PM +Formatted timestamp is : 19691231 05:00 PM ------------ Input timestamp is : -3600 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Wednesday, December 31, 1969 1:00:00 PM GMT-10:00 +Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : December 31, 1969 1:00:00 PM GMT-10:00 +Formatted timestamp is : December 31, 1969 3:00:00 PM PST IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Dec 31, 1969 1:00:00 PM +Formatted timestamp is : Dec 31, 1969 3:00:00 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted timestamp is : 12/31/69 1:00 PM +Formatted timestamp is : 12/31/69 3:00 PM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted timestamp is : 19691231 01:00 PM +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' , +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' , ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM GMT-10:00 +Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted localtime_array is : April 3, 2005 7:03:24 PM GMT-10:00 +Formatted localtime_array is : April 3, 2005 7:03:24 PM PDT IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 Formatted localtime_array is : Apr 3, 2005 7:03:24 PM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 @@ -258,31 +267,31 @@ IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 Formatted localtime_array is : 20050403 07:03 PM ------------ -Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' , +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' , ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted localtime_array is : Wednesday, May 13, 2105 7:05:21 AM GMT-10:00 +Formatted localtime_array is : Friday, April 3, 2105 3:03:24 AM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted localtime_array is : May 13, 2105 7:05:21 AM GMT-10:00 +Formatted localtime_array is : April 3, 2105 3:03:24 AM PDT IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted localtime_array is : May 13, 2105 7:05:21 AM +Formatted localtime_array is : Apr 3, 2105 3:03:24 AM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted localtime_array is : 5/13/05 7:05 AM +Formatted localtime_array is : 4/3/05 3:03 AM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted localtime_array is : 21050513 07:05 AM +Formatted localtime_array is : 21050403 03:03 AM ------------ -Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +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' , ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted localtime_array is : Tuesday, December 17, 1895 12:13:11 AM GMT-10:00 +Formatted localtime_array is : Wednesday, April 3, 1895 3:03:24 AM PT IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted localtime_array is : December 17, 1895 12:13:11 AM GMT-10:00 +Formatted localtime_array is : April 3, 1895 3:03:24 AM PDT IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted localtime_array is : Dec 17, 1895 12:13:11 AM +Formatted localtime_array is : Apr 3, 1895 3:03:24 AM IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3 -Formatted localtime_array is : 12/17/95 12:13 AM +Formatted localtime_array is : 4/3/95 3:03 AM IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1 -Formatted localtime_array is : 18951217 12:13 AM
\ No newline at end of file +Formatted localtime_array is : 18950403 03:03 AM diff --git a/ext/intl/tests/dateformat_format_parse.phpt b/ext/intl/tests/dateformat_format_parse.phpt index eb4e989844..ec12de5f0e 100755 --- a/ext/intl/tests/dateformat_format_parse.phpt +++ b/ext/intl/tests/dateformat_format_parse.phpt @@ -12,8 +12,6 @@ datefmt_format_code() and datefmt_parse_code() function ut_main() { - $timezone = 'GMT+5'; - $locale_arr = array ( 'en_US' ); @@ -45,22 +43,31 @@ function ut_main() 'tm_mday' => 3, 'tm_mon' => 3, 'tm_year' => 105, + 'tm_wday' => 0, + 'tm_yday' => 93, + 'tm_isdst' => 1 ); $localtime_arr2 = array ( - 'tm_sec' => 21, - 'tm_min' => 5, - 'tm_hour' => 7, - 'tm_mday' => 13, - 'tm_mon' => 7, + '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 ); $localtime_arr3 = array ( - 'tm_sec' => 11, - 'tm_min' => 13, - 'tm_hour' => 0, - 'tm_mday' => 17, - 'tm_mon' => 11, - 'tm_year' => -5 + '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 ); $localtime_arr = array ( @@ -77,7 +84,7 @@ function ut_main() foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $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); @@ -102,7 +109,7 @@ function ut_main() foreach( $locale_arr as $locale_entry ){ foreach( $datetype_arr as $datetype_entry ) { $res_str .= "\nIntlDateFormatter locale= $locale_entry ,datetype = $datetype_entry ,timetype =$datetype_entry "; - $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone); + $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){ $res_str .= "\nFormatted localtime_array is : $formatted1"; @@ -144,13 +151,13 @@ Input timestamp is : 0 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Thursday, January 1, 1970 5:00:00 AM GMT+05:00 +Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT Parsed timestamp is : 0 IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : January 1, 1970 5:00:00 AM GMT+05:00 +Formatted timestamp is : December 31, 1969 4:00:00 PM PST Parsed timestamp is : 0 IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Jan 1, 1970 5:00:00 AM +Formatted timestamp is : Dec 31, 1969 4:00:00 PM Parsed timestamp is : 0 ------------ @@ -158,13 +165,13 @@ Input timestamp is : -1200000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Thursday, December 18, 1969 7:40:00 AM GMT+05:00 +Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT Parsed timestamp is : -1200000 IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : December 18, 1969 7:40:00 AM GMT+05:00 +Formatted timestamp is : December 17, 1969 6:40:00 PM PST Parsed timestamp is : -1200000 IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Dec 18, 1969 7:40:00 AM +Formatted timestamp is : Dec 17, 1969 6:40:00 PM Parsed timestamp is : -1200000 ------------ @@ -172,13 +179,13 @@ Input timestamp is : 1200000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Thursday, January 15, 1970 2:20:00 AM GMT+05:00 +Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT Parsed timestamp is : 1200000 IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : January 15, 1970 2:20:00 AM GMT+05:00 +Formatted timestamp is : January 14, 1970 1:20:00 PM PST Parsed timestamp is : 1200000 IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Jan 15, 1970 2:20:00 AM +Formatted timestamp is : Jan 14, 1970 1:20:00 PM Parsed timestamp is : 1200000 ------------ @@ -186,15 +193,15 @@ Input timestamp is : 2200000000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Monday, September 19, 2039 4:06:40 AM GMT+05:00 +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' IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : September 19, 2039 4:06:40 AM GMT+05:00 +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' IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Sep 19, 2039 4:06:40 AM +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' ------------ @@ -203,15 +210,15 @@ Input timestamp is : -2200000000 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Sunday, April 15, 1900 5:53:20 AM GMT+05:00 +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' IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : April 15, 1900 5:53:20 AM GMT+05:00 +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' IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Apr 15, 1900 5:53:20 AM +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' ------------ @@ -220,13 +227,13 @@ Input timestamp is : 90099999 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Thursday, November 9, 1972 12:46:39 AM GMT+05:00 +Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT Parsed timestamp is : 90099999 IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : November 9, 1972 12:46:39 AM GMT+05:00 +Formatted timestamp is : November 8, 1972 11:46:39 AM PST Parsed timestamp is : 90099999 IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Nov 9, 1972 12:46:39 AM +Formatted timestamp is : Nov 8, 1972 11:46:39 AM Parsed timestamp is : 90099999 ------------ @@ -234,13 +241,13 @@ Input timestamp is : 3600 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Thursday, January 1, 1970 6:00:00 AM GMT+05:00 +Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT Parsed timestamp is : 3600 IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : January 1, 1970 6:00:00 AM GMT+05:00 +Formatted timestamp is : December 31, 1969 5:00:00 PM PST Parsed timestamp is : 3600 IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Jan 1, 1970 6:00:00 AM +Formatted timestamp is : Dec 31, 1969 5:00:00 PM Parsed timestamp is : 3600 ------------ @@ -248,53 +255,53 @@ Input timestamp is : -3600 ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted timestamp is : Thursday, January 1, 1970 4:00:00 AM GMT+05:00 +Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT Parsed timestamp is : -3600 IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted timestamp is : January 1, 1970 4:00:00 AM GMT+05:00 +Formatted timestamp is : December 31, 1969 3:00:00 PM PST Parsed timestamp is : -3600 IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted timestamp is : Jan 1, 1970 4:00:00 AM +Formatted timestamp is : Dec 31, 1969 3:00:00 PM Parsed timestamp is : -3600 ------------ -Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , +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' , ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM GMT+05:00 -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 : '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' , IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted localtime_array is : April 3, 2005 7:03:24 PM GMT+05:00 -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 : '0' , +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' , 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 : '0' , +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' , ------------ -Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '7' , tm_year : '205' , +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' , ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted localtime_array is : Thursday, August 13, 2105 7:05:21 AM GMT+05:00 -Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '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' , IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted localtime_array is : August 13, 2105 7:05:21 AM GMT+05:00 -Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +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' , IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted localtime_array is : Aug 13, 2105 7:05:21 AM -Parsed array is: tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_year : '205' , tm_mday : '13' , tm_wday : '4' , tm_yday : '225' , tm_mon : '7' , tm_isdst : '0' , +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' , ------------ -Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' , +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' , ------------ IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0 -Formatted localtime_array is : Tuesday, December 17, 1895 12:13:11 AM GMT+05:00 -Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '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' , IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1 -Formatted localtime_array is : December 17, 1895 12:13:11 AM GMT+05:00 -Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' , +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' , IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2 -Formatted localtime_array is : Dec 17, 1895 12:13:11 AM -Parsed array is: tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_year : '-5' , tm_mday : '17' , tm_wday : '2' , tm_yday : '351' , tm_mon : '11' , tm_isdst : '0' ,
\ No newline at end of file +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' ,
\ No newline at end of file diff --git a/ext/intl/tests/formatter_format.phpt b/ext/intl/tests/formatter_format.phpt index 413c71d7a8..4483d83a5f 100755 --- a/ext/intl/tests/formatter_format.phpt +++ b/ext/intl/tests/formatter_format.phpt @@ -9,10 +9,6 @@ numfmt_format() * Format a number using misc locales/patterns. */ -/* - * TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed - * currency and percent formatting. - */ function ut_main() { @@ -29,15 +25,10 @@ function ut_main() 1234999, // bad one ); - $integer = array( - NumberFormatter::ORDINAL => '', - NumberFormatter::DURATION => '', - ); $locales = array( 'en_US', 'ru_UA', 'de', - 'fr', 'en_UK' ); @@ -46,7 +37,7 @@ function ut_main() foreach( $locales as $locale ) { - $str_res .= "\nLocale is: $locale\n"; + $str_res .= "\n Locale is: $locale\n"; foreach( $styles as $style => $pattern ) { $fmt = ut_nfmt_create( $locale, $style, $pattern ); @@ -55,7 +46,7 @@ function ut_main() $str_res .= "Bad formatter!\n"; continue; } - $str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n"; + $str_res .= dump( ut_nfmt_format( $fmt, $number ) ) . "\n"; } } return $str_res; @@ -67,63 +58,51 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECTREGEX-- +--EXPECT-- Locale is: en_US '1234567.89123457' '1,234,567.891' -'\$1,234,567.89' +'$1,234,567.89' '123,456,789%' '1.23456789123457E6' 'one million, two hundred and thirty-four thousand, five hundred and sixty-seven point eight nine one two three four five seven' -'1,234,567th' -'342:56:07' +'1,234,568th' +'342:56:08' '#####.###' Bad formatter! -Locale is: ru_UA + Locale is: ru_UA '1234567,89123457' '1 234 567,891' '1 234 567,89 грн.' -'123 456 789 ?%' +'123 456 789%' '1,23456789123457E6' 'миллион два сто тридцать четыре тысяча пять сто шестьдесят восемь' -'1 234 567' -'1 234 567' +'1 234 568' +'1 234 568' '#####.###' Bad formatter! -Locale is: de + Locale is: de '1234567,89123457' '1.234.567,891' -'(¤ )?1.234.567,89( ¤)?' -'123.456.789 ?%' +'¤ 1.234.567,89' +'123.456.789%' '1,23456789123457E6' 'eine Million zweihundertvierunddreißigtausendfünfhundertsiebenundsechzig komma acht neun eins zwei drei vier fünf sieben' -'1.234.567' -'1.234.567' -'#####.###' -Bad formatter! - -Locale is: fr -'1234567,89123457' -'1 234 567,891' -'1 234 567,89 ¤' -'123 456 789 ?%' -'1,23456789123457E6' -'un million deux cents trente-quatre mille cinq cents soixante-sept virgule huit neuf un deux trois quatre cinq sept' -'1 234 567' -'1 234 567' +'1.234.568' +'1.234.568' '#####.###' Bad formatter! -Locale is: en_UK + Locale is: en_UK '1234567.89123457' '1,234,567.891' '¤1,234,567.89' '123,456,789%' '1.23456789123457E6' 'one million, two hundred and thirty-four thousand, five hundred and sixty-seven point eight nine one two three four five seven' -'1,234,567th' -'342:56:07' +'1,234,568th' +'342:56:08' '#####.###' -Bad formatter!
\ No newline at end of file +Bad formatter! diff --git a/ext/intl/tests/formatter_format_currency.phpt b/ext/intl/tests/formatter_format_currency.phpt index 715f12256c..b9c2e50dd6 100755 --- a/ext/intl/tests/formatter_format_currency.phpt +++ b/ext/intl/tests/formatter_format_currency.phpt @@ -8,10 +8,6 @@ numfmt_format_currency() /* * Format a number using misc currencies/locales. */ -/* - * TODO: doesn't pass on ICU 3.6 because 'ru' and 'uk' locales changed - * currency formatting. - */ function ut_main() @@ -41,9 +37,9 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECTREGEX-- +--EXPECT-- en_UK: '£1,234,567.89' -en_US: '\$1,234,567.89' -ru: '1 234 567,89 ?р.' -uk: '(грн. )?1 234 567,89( грн.)?' -en: 'UAH1,234,567.89'
\ No newline at end of file +en_US: '$1,234,567.89' +ru: '1 234 567,89р.' +uk: 'грн. 1 234 567,89' +en: 'UAH1,234,567.89' diff --git a/ext/intl/tests/formatter_get_locale.phpt b/ext/intl/tests/formatter_get_locale.phpt index 3d4fb2ae4e..1a9b780124 100755 --- a/ext/intl/tests/formatter_get_locale.phpt +++ b/ext/intl/tests/formatter_get_locale.phpt @@ -14,7 +14,7 @@ function ut_main() $locales = array( 'en_UK', 'en_US@California', - 'fr_CA', + 'uk', ); $loc_types = array( @@ -46,4 +46,4 @@ ut_run(); --EXPECT-- en_UK: actual='en' valid='en' en_US@California: actual='en' valid='en' -fr_CA: actual='fr_CA' valid='fr_CA' +uk: actual='root' valid='uk' diff --git a/ext/intl/tests/formatter_get_set_pattern.phpt b/ext/intl/tests/formatter_get_set_pattern.phpt index 0ae5b308b2..89f45a3c46 100755 --- a/ext/intl/tests/formatter_get_set_pattern.phpt +++ b/ext/intl/tests/formatter_get_set_pattern.phpt @@ -43,8 +43,8 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECTF-- -Default pattern: '#.####################################################################################################################################################################################################################################################################################################################%s' +--EXPECT-- +Default pattern: '#.#####################################################################################################################################################################################################################################################################################################################' Formatting result: 12345.123456 New pattern: '#0.0' Formatted number: 12345.1 diff --git a/ext/intl/tests/locale_get_display_language.phpt b/ext/intl/tests/locale_get_display_language.phpt index 2e00056284..3b61cae3ac 100755 --- a/ext/intl/tests/locale_get_display_language.phpt +++ b/ext/intl/tests/locale_get_display_language.phpt @@ -92,7 +92,7 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECTREGEX-- +--EXPECT-- locale='uk-ua_CALIFORNIA@currency=;currency=GRN' disp_locale=en : display_language=Ukrainian disp_locale=fr : display_language=ukrainien @@ -101,7 +101,7 @@ disp_locale=de : display_language=Ukrainisch locale='root' disp_locale=en : display_language=Root disp_locale=fr : display_language=racine -disp_locale=de : display_language=[rR]oot +disp_locale=de : display_language=root ----------------- locale='uk@currency=EURO' disp_locale=en : display_language=Ukrainian diff --git a/ext/intl/tests/locale_get_display_name.phpt b/ext/intl/tests/locale_get_display_name.phpt index 1e84bc2b96..5082b63c5f 100755 --- a/ext/intl/tests/locale_get_display_name.phpt +++ b/ext/intl/tests/locale_get_display_name.phpt @@ -88,7 +88,6 @@ function ut_main() foreach( $disp_locales as $disp_locale ) { $scr = ut_loc_get_display_name( $locale ,$disp_locale ); - $scr = str_replace(array('(', ')'), '#', $scr); $res_str .= "disp_locale=$disp_locale : display_name=$scr"; $res_str .= "\n"; } @@ -103,26 +102,26 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECTREGEX-- +--EXPECT-- locale='sl_IT_nedis_KIRTI' -disp_locale=en : display_name=Slovenian #Italy, NEDIS_KIRTI# -disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI# -disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI# +disp_locale=en : display_name=Slovenian (Italy, NEDIS_KIRTI) +disp_locale=fr : display_name=slovène (Italie, NEDIS_KIRTI) +disp_locale=de : display_name=Slowenisch (Italien, NEDIS_KIRTI) ----------------- locale='sl_IT_nedis-a-kirti-x-xyz' -disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ# -disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ# -disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ# +disp_locale=en : display_name=Slovenian (Italy, NEDIS_A_KIRTI_X_XYZ) +disp_locale=fr : display_name=slovène (Italie, NEDIS_A_KIRTI_X_XYZ) +disp_locale=de : display_name=Slowenisch (Italien, NEDIS_A_KIRTI_X_XYZ) ----------------- locale='sl_IT_rozaj' -disp_locale=en : display_name=Slovenian #Italy, Resian# -disp_locale=fr : display_name=slovène #Italie, dialecte de Resia# -disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch)# +disp_locale=en : display_name=Slovenian (Italy, Resian) +disp_locale=fr : display_name=slovène (Italie, dialecte de Resia) +disp_locale=de : display_name=Slowenisch (Italien, ROZAJ) ----------------- locale='sl_IT_NEDIS_ROJAZ_1901' -disp_locale=en : display_name=Slovenian #Italy, NEDIS_ROJAZ_1901# -disp_locale=fr : display_name=slovène #Italie, NEDIS_ROJAZ_1901# -disp_locale=de : display_name=Slowenisch #Italien, NEDIS_ROJAZ_1901# +disp_locale=en : display_name=Slovenian (Italy, NEDIS_ROJAZ_1901) +disp_locale=fr : display_name=slovène (Italie, NEDIS_ROJAZ_1901) +disp_locale=de : display_name=Slowenisch (Italien, NEDIS_ROJAZ_1901) ----------------- locale='i-enochian' disp_locale=en : display_name=i-enochian @@ -130,14 +129,14 @@ disp_locale=fr : display_name=i-enochian disp_locale=de : display_name=i-enochian ----------------- locale='zh-hakka' -disp_locale=en : display_name=Chinese #HAKKA# -disp_locale=fr : display_name=chinois #HAKKA# -disp_locale=de : display_name=Chinesisch #HAKKA# +disp_locale=en : display_name=Chinese (HAKKA) +disp_locale=fr : display_name=chinois (HAKKA) +disp_locale=de : display_name=Chinesisch (HAKKA) ----------------- locale='zh-wuu' -disp_locale=en : display_name=Chinese #WUU# -disp_locale=fr : display_name=chinois #WUU# -disp_locale=de : display_name=Chinesisch #WUU# +disp_locale=en : display_name=Chinese (WUU) +disp_locale=fr : display_name=chinois (WUU) +disp_locale=de : display_name=Chinesisch (WUU) ----------------- locale='i-tay' disp_locale=en : display_name=i-tay @@ -145,34 +144,34 @@ disp_locale=fr : display_name=i-tay disp_locale=de : display_name=i-tay ----------------- locale='sgn-BE-nl' -disp_locale=en : display_name=Sign Languages? #Belgium, NL# -disp_locale=fr : display_name=langues? des signes #Belgique, NL# -disp_locale=de : display_name=Gebärdensprache #Belgien, NL# +disp_locale=en : display_name=Sign Languages (Belgium, NL) +disp_locale=fr : display_name=langues des signes (Belgique, NL) +disp_locale=de : display_name=Gebärdensprache (Belgien, NL) ----------------- locale='sgn-CH-de' -disp_locale=en : display_name=Sign Languages? #Switzerland, DE# -disp_locale=fr : display_name=langues? des signes #Suisse, DE# -disp_locale=de : display_name=Gebärdensprache #Schweiz, DE# +disp_locale=en : display_name=Sign Languages (Switzerland, DE) +disp_locale=fr : display_name=langues des signes (Suisse, DE) +disp_locale=de : display_name=Gebärdensprache (Schweiz, DE) ----------------- locale='sl_IT_rozaj@currency=EUR' -disp_locale=en : display_name=Slovenian #Italy, Resian, [Cc]urrency=Euro# -disp_locale=fr : display_name=slovène #Italie, dialecte de Resia, Devise=euro# -disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch), Währung=Euro# +disp_locale=en : display_name=Slovenian (Italy, Resian, Currency=Euro) +disp_locale=fr : display_name=slovène (Italie, dialecte de Resia, Devise=euro) +disp_locale=de : display_name=Slowenisch (Italien, ROZAJ, Währung=Euro) ----------------- locale='uk-ua_CALIFORNIA@currency=;currency=GRN' -disp_locale=en : display_name=Ukrainian #Ukraine, CALIFORNIA, [Cc]urrency# -disp_locale=fr : display_name=ukrainien #Ukraine, CALIFORNIA, Devise# -disp_locale=de : display_name=Ukrainisch #Ukraine, CALIFORNIA, Währung# +disp_locale=en : display_name=Ukrainian (Ukraine, CALIFORNIA, Currency) +disp_locale=fr : display_name=ukrainien (Ukraine, CALIFORNIA, Devise) +disp_locale=de : display_name=Ukrainisch (Ukraine, CALIFORNIA, Währung) ----------------- locale='root' disp_locale=en : display_name=Root disp_locale=fr : display_name=racine -disp_locale=de : display_name=[Rr]oot +disp_locale=de : display_name=root ----------------- locale='uk@currency=EURO' -disp_locale=en : display_name=Ukrainian #[Cc]urrency=EURO# -disp_locale=fr : display_name=ukrainien #Devise=EURO# -disp_locale=de : display_name=Ukrainisch #Währung=EURO# +disp_locale=en : display_name=Ukrainian (Currency=EURO) +disp_locale=fr : display_name=ukrainien (Devise=EURO) +disp_locale=de : display_name=Ukrainisch (Währung=EURO) ----------------- locale='Hindi' disp_locale=en : display_name=hindi @@ -200,94 +199,94 @@ disp_locale=fr : display_name=i-enochian disp_locale=de : display_name=i-enochian ----------------- locale='zh-Hant' -disp_locale=en : display_name=Chinese #Traditional Han# -disp_locale=fr : display_name=chinois #idéogrammes han #variante traditionnelle## -disp_locale=de : display_name=Chinesisch #Traditionelle Chinesische Schrift# +disp_locale=en : display_name=Chinese (Traditional Han) +disp_locale=fr : display_name=chinois (idéogrammes han (variante traditionnelle)) +disp_locale=de : display_name=Chinesisch (Traditionelle Chinesische Schrift) ----------------- locale='zh-Hans' -disp_locale=en : display_name=Chinese #Simplified Han# -disp_locale=fr : display_name=chinois #idéogrammes han #variante simplifiée## -disp_locale=de : display_name=Chinesisch #Vereinfachte Chinesische Schrift# +disp_locale=en : display_name=Chinese (Simplified Han) +disp_locale=fr : display_name=chinois (idéogrammes han (variante simplifiée)) +disp_locale=de : display_name=Chinesisch (Vereinfachte Chinesische Schrift) ----------------- locale='sr-Cyrl' -disp_locale=en : display_name=Serbian #Cyrillic# -disp_locale=fr : display_name=serbe #cyrillique# -disp_locale=de : display_name=Serbisch #Kyrillisch# +disp_locale=en : display_name=Serbian (Cyrillic) +disp_locale=fr : display_name=serbe (cyrillique) +disp_locale=de : display_name=Serbisch (Kyrillisch) ----------------- locale='sr-Latn' -disp_locale=en : display_name=Serbian #Latin# -disp_locale=fr : display_name=serbe #latin# -disp_locale=de : display_name=Serbisch #Lateinisch# +disp_locale=en : display_name=Serbian (Latin) +disp_locale=fr : display_name=serbe (latin) +disp_locale=de : display_name=Serbisch (Lateinisch) ----------------- locale='zh-Hans-CN' -disp_locale=en : display_name=Chinese #Simplified Han, China# -disp_locale=fr : display_name=chinois #idéogrammes han #variante simplifiée#, Chine# -disp_locale=de : display_name=Chinesisch #Vereinfachte Chinesische Schrift, China# +disp_locale=en : display_name=Chinese (Simplified Han, China) +disp_locale=fr : display_name=chinois (idéogrammes han (variante simplifiée), Chine) +disp_locale=de : display_name=Chinesisch (Vereinfachte Chinesische Schrift, China) ----------------- locale='sr-Latn-CS' -disp_locale=en : display_name=Serbian #Latin, Serbia [aA]nd Montenegro# -disp_locale=fr : display_name=serbe #latin, Serbie-et-Monténégro# -disp_locale=de : display_name=Serbisch #Lateinisch, Serbien und Montenegro# +disp_locale=en : display_name=Serbian (Latin, Serbia And Montenegro) +disp_locale=fr : display_name=serbe (latin, Serbie-et-Monténégro) +disp_locale=de : display_name=Serbisch (Lateinisch, Serbien und Montenegro) ----------------- locale='sl-rozaj' -disp_locale=en : display_name=Slovenian #ROZAJ# -disp_locale=fr : display_name=slovène #ROZAJ# -disp_locale=de : display_name=Slowenisch #(ROZAJ|Resianisch)# +disp_locale=en : display_name=Slovenian (ROZAJ) +disp_locale=fr : display_name=slovène (ROZAJ) +disp_locale=de : display_name=Slowenisch (ROZAJ) ----------------- locale='sl-nedis' -disp_locale=en : display_name=Slovenian #NEDIS# -disp_locale=fr : display_name=slovène #NEDIS# -disp_locale=de : display_name=Slowenisch #NEDIS# +disp_locale=en : display_name=Slovenian (NEDIS) +disp_locale=fr : display_name=slovène (NEDIS) +disp_locale=de : display_name=Slowenisch (NEDIS) ----------------- locale='de-CH-1901' -disp_locale=en : display_name=German #Switzerland, Traditional German orthography# -disp_locale=fr : display_name=allemand #Suisse, orthographe allemande traditionnelle# -disp_locale=de : display_name=Deutsch #Schweiz, (1901|alte deutsche Rechtschreibung)# +disp_locale=en : display_name=German (Switzerland, Traditional German orthography) +disp_locale=fr : display_name=allemand (Suisse, orthographe allemande traditionnelle) +disp_locale=de : display_name=Deutsch (Schweiz, 1901) ----------------- locale='sl-IT-nedis' -disp_locale=en : display_name=Slovenian #Italy, Natisone dialect# -disp_locale=fr : display_name=slovène #Italie, dialecte de Natisone# -disp_locale=de : display_name=Slowenisch #Italien, (NEDIS|Natisone-Dialekt)# +disp_locale=en : display_name=Slovenian (Italy, Natisone dialect) +disp_locale=fr : display_name=slovène (Italie, dialecte de Natisone) +disp_locale=de : display_name=Slowenisch (Italien, NEDIS) ----------------- locale='sl-Latn-IT-nedis' -disp_locale=en : display_name=Slovenian #Latin, Italy, Natisone dialect# -disp_locale=fr : display_name=slovène #latin, Italie, dialecte de Natisone# -disp_locale=de : display_name=Slowenisch #Lateinisch, Italien, (NEDIS|Natisone-Dialekt)# +disp_locale=en : display_name=Slovenian (Latin, Italy, Natisone dialect) +disp_locale=fr : display_name=slovène (latin, Italie, dialecte de Natisone) +disp_locale=de : display_name=Slowenisch (Lateinisch, Italien, NEDIS) ----------------- locale='de-DE' -disp_locale=en : display_name=German #Germany# -disp_locale=fr : display_name=allemand #Allemagne# -disp_locale=de : display_name=Deutsch #Deutschland# +disp_locale=en : display_name=German (Germany) +disp_locale=fr : display_name=allemand (Allemagne) +disp_locale=de : display_name=Deutsch (Deutschland) ----------------- locale='en-US' -disp_locale=en : display_name=English #United States# -disp_locale=fr : display_name=anglais #États-Unis# -disp_locale=de : display_name=Englisch #Vereinigte Staaten# +disp_locale=en : display_name=English (United States) +disp_locale=fr : display_name=anglais (États-Unis) +disp_locale=de : display_name=Englisch (Vereinigte Staaten) ----------------- locale='es-419' -disp_locale=en : display_name=Spanish #Latin America and the Caribbean# -disp_locale=fr : display_name=espagnol #Amérique latine et Caraïbes# -disp_locale=de : display_name=Spanisch #Lateinamerika und Karibik# +disp_locale=en : display_name=Spanish (Latin America and the Caribbean) +disp_locale=fr : display_name=espagnol (Amérique latine et Caraïbes) +disp_locale=de : display_name=Spanisch (Lateinamerika und Karibik) ----------------- locale='de-CH-x-phonebk' -disp_locale=en : display_name=German #Switzerland, X_PHONEBK# -disp_locale=fr : display_name=allemand #Suisse, X_PHONEBK# -disp_locale=de : display_name=Deutsch #Schweiz, X_PHONEBK# +disp_locale=en : display_name=German (Switzerland, X_PHONEBK) +disp_locale=fr : display_name=allemand (Suisse, X_PHONEBK) +disp_locale=de : display_name=Deutsch (Schweiz, X_PHONEBK) ----------------- locale='az-Arab-x-AZE-derbend' -disp_locale=en : display_name=Azerbaijani #Arabic, X, AZE_DERBEND# -disp_locale=fr : display_name=azéri #arabe, X, AZE_DERBEND# -disp_locale=de : display_name=Aserbaidschanisch #Arabisch, X, AZE_DERBEND# +disp_locale=en : display_name=Azerbaijani (Arabic, X, AZE_DERBEND) +disp_locale=fr : display_name=azéri (arabe, X, AZE_DERBEND) +disp_locale=de : display_name=Aserbaidschanisch (Arabisch, X, AZE_DERBEND) ----------------- locale='zh-min' -disp_locale=en : display_name=Chinese #MIN# -disp_locale=fr : display_name=chinois #MIN# -disp_locale=de : display_name=Chinesisch #MIN# +disp_locale=en : display_name=Chinese (MIN) +disp_locale=fr : display_name=chinois (MIN) +disp_locale=de : display_name=Chinesisch (MIN) ----------------- locale='zh-min-nan-Hant-CN' -disp_locale=en : display_name=Chinese #MIN, NAN_HANT_CN# -disp_locale=fr : display_name=chinois #MIN, NAN_HANT_CN# -disp_locale=de : display_name=Chinesisch #MIN, NAN_HANT_CN# +disp_locale=en : display_name=Chinese (MIN, NAN_HANT_CN) +disp_locale=fr : display_name=chinois (MIN, NAN_HANT_CN) +disp_locale=de : display_name=Chinesisch (MIN, NAN_HANT_CN) ----------------- locale='x-whatever' disp_locale=en : display_name=x-whatever @@ -295,47 +294,47 @@ disp_locale=fr : display_name=x-whatever disp_locale=de : display_name=x-whatever ----------------- locale='qaa-Qaaa-QM-x-southern' -disp_locale=en : display_name=qaa #Qaaa, QM, X_SOUTHERN# -disp_locale=fr : display_name=qaa #Qaaa, QM, X_SOUTHERN# -disp_locale=de : display_name=qaa #Qaaa, QM, X_SOUTHERN# +disp_locale=en : display_name=qaa (Qaaa, QM, X_SOUTHERN) +disp_locale=fr : display_name=qaa (Qaaa, QM, X_SOUTHERN) +disp_locale=de : display_name=qaa (Qaaa, QM, X_SOUTHERN) ----------------- locale='sr-Latn-QM' -disp_locale=en : display_name=Serbian #Latin, QM# -disp_locale=fr : display_name=serbe #latin, QM# -disp_locale=de : display_name=Serbisch #Lateinisch, QM# +disp_locale=en : display_name=Serbian (Latin, QM) +disp_locale=fr : display_name=serbe (latin, QM) +disp_locale=de : display_name=Serbisch (Lateinisch, QM) ----------------- locale='sr-Qaaa-CS' -disp_locale=en : display_name=Serbian #Qaaa, Serbia [aA]nd Montenegro# -disp_locale=fr : display_name=serbe #Qaaa, Serbie-et-Monténégro# -disp_locale=de : display_name=Serbisch #Qaaa, Serbien und Montenegro# +disp_locale=en : display_name=Serbian (Qaaa, Serbia And Montenegro) +disp_locale=fr : display_name=serbe (Qaaa, Serbie-et-Monténégro) +disp_locale=de : display_name=Serbisch (Qaaa, Serbien und Montenegro) ----------------- locale='en-US-u-islamCal' -disp_locale=en : display_name=English #United States, U_ISLAMCAL# -disp_locale=fr : display_name=anglais #États-Unis, U_ISLAMCAL# -disp_locale=de : display_name=Englisch #Vereinigte Staaten, U_ISLAMCAL# +disp_locale=en : display_name=English (United States, U_ISLAMCAL) +disp_locale=fr : display_name=anglais (États-Unis, U_ISLAMCAL) +disp_locale=de : display_name=Englisch (Vereinigte Staaten, U_ISLAMCAL) ----------------- locale='zh-CN-a-myExt-x-private' -disp_locale=en : display_name=Chinese #China, A_MYEXT_X_PRIVATE# -disp_locale=fr : display_name=chinois #Chine, A_MYEXT_X_PRIVATE# -disp_locale=de : display_name=Chinesisch #China, A_MYEXT_X_PRIVATE# +disp_locale=en : display_name=Chinese (China, A_MYEXT_X_PRIVATE) +disp_locale=fr : display_name=chinois (Chine, A_MYEXT_X_PRIVATE) +disp_locale=de : display_name=Chinesisch (China, A_MYEXT_X_PRIVATE) ----------------- locale='en-a-myExt-b-another' -disp_locale=en : display_name=English #A, MYEXT_B_ANOTHER# -disp_locale=fr : display_name=anglais #A, MYEXT_B_ANOTHER# -disp_locale=de : display_name=Englisch #A, MYEXT_B_ANOTHER# +disp_locale=en : display_name=English (A, MYEXT_B_ANOTHER) +disp_locale=fr : display_name=anglais (A, MYEXT_B_ANOTHER) +disp_locale=de : display_name=Englisch (A, MYEXT_B_ANOTHER) ----------------- locale='de-419-DE' -disp_locale=en : display_name=German #Latin America and the Caribbean, DE# -disp_locale=fr : display_name=allemand #Amérique latine et Caraïbes, DE# -disp_locale=de : display_name=Deutsch #Lateinamerika und Karibik, DE# +disp_locale=en : display_name=German (Latin America and the Caribbean, DE) +disp_locale=fr : display_name=allemand (Amérique latine et Caraïbes, DE) +disp_locale=de : display_name=Deutsch (Lateinamerika und Karibik, DE) ----------------- locale='a-DE' -disp_locale=en : display_name=a #Germany# -disp_locale=fr : display_name=a #Allemagne# -disp_locale=de : display_name=a #Deutschland# +disp_locale=en : display_name=a (Germany) +disp_locale=fr : display_name=a (Allemagne) +disp_locale=de : display_name=a (Deutschland) ----------------- locale='ar-a-aaa-b-bbb-a-ccc' -disp_locale=en : display_name=Arabic #A, AAA_B_BBB_A_CCC# -disp_locale=fr : display_name=arabe #A, AAA_B_BBB_A_CCC# -disp_locale=de : display_name=Arabisch #A, AAA_B_BBB_A_CCC# +disp_locale=en : display_name=Arabic (A, AAA_B_BBB_A_CCC) +disp_locale=fr : display_name=arabe (A, AAA_B_BBB_A_CCC) +disp_locale=de : display_name=Arabisch (A, AAA_B_BBB_A_CCC) ----------------- diff --git a/ext/intl/tests/locale_get_display_region.phpt b/ext/intl/tests/locale_get_display_region.phpt index 47ebeb7af6..ba90472e5d 100755 --- a/ext/intl/tests/locale_get_display_region.phpt +++ b/ext/intl/tests/locale_get_display_region.phpt @@ -91,7 +91,7 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECTREGEX-- +--EXPECT-- locale='uk-ua_CALIFORNIA@currency=;currency=GRN' disp_locale=en : display_region=Ukraine disp_locale=fr : display_region=Ukraine @@ -158,7 +158,7 @@ disp_locale=fr : display_region=Chine disp_locale=de : display_region=China ----------------- locale='sr-Latn-CS' -disp_locale=en : display_region=Serbia [Aa]nd Montenegro +disp_locale=en : display_region=Serbia And Montenegro disp_locale=fr : display_region=Serbie-et-Monténégro disp_locale=de : display_region=Serbien und Montenegro ----------------- @@ -238,7 +238,7 @@ disp_locale=fr : display_region=QM disp_locale=de : display_region=QM ----------------- locale='sr-Qaaa-CS' -disp_locale=en : display_region=Serbia [Aa]nd Montenegro +disp_locale=en : display_region=Serbia And Montenegro disp_locale=fr : display_region=Serbie-et-Monténégro disp_locale=de : display_region=Serbien und Montenegro ----------------- diff --git a/ext/intl/tests/locale_get_display_variant.phpt b/ext/intl/tests/locale_get_display_variant.phpt index 7a58ba34d3..34f3ba8ee0 100755 --- a/ext/intl/tests/locale_get_display_variant.phpt +++ b/ext/intl/tests/locale_get_display_variant.phpt @@ -91,7 +91,7 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECTREGEX-- +--EXPECT-- locale='uk-ua_CALIFORNIA@currency=;currency=GRN' disp_locale=en : display_variant=CALIFORNIA disp_locale=fr : display_variant=CALIFORNIA @@ -175,17 +175,17 @@ disp_locale=de : display_variant= locale='de-CH-1901' disp_locale=en : display_variant=Traditional German orthography disp_locale=fr : display_variant=orthographe allemande traditionnelle -disp_locale=de : display_variant=(1901|alte deutsche Rechtschreibung) +disp_locale=de : display_variant=1901 ----------------- locale='sl-IT-nedis' disp_locale=en : display_variant=Natisone dialect disp_locale=fr : display_variant=dialecte de Natisone -disp_locale=de : display_variant=(NEDIS|Natisone-Dialekt) +disp_locale=de : display_variant=NEDIS ----------------- locale='sl-Latn-IT-nedis' disp_locale=en : display_variant=Natisone dialect disp_locale=fr : display_variant=dialecte de Natisone -disp_locale=de : display_variant=(NEDIS|Natisone-Dialekt) +disp_locale=de : display_variant=NEDIS ----------------- locale='de-DE' disp_locale=en : display_variant= |