ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
ULOC_VALID_LOCALE = 'uk'
ULOC_ACTUAL_LOCALE = 'uk'
-Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 64 characters: U_ILLEGAL_ARGUMENT_ERROR
+Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 80 characters: U_ILLEGAL_ARGUMENT_ERROR
function ut_main()
{
+ $timezone = 'GMT-10';
+
$locale_arr = array (
'en_US'
);
'tm_mday' => 3,
'tm_mon' => 3,
'tm_year' => 105,
- 'tm_wday' => 0,
- 'tm_yday' => 93,
- 'tm_isdst' => 1
);
$localtime_arr2 = array (
- 'tm_sec' => 24 ,
- 'tm_min' => 3,
- 'tm_hour' => 3,
- 'tm_mday' => 3,
- 'tm_mon' => 3,
+ 'tm_sec' => 21,
+ 'tm_min' => 5,
+ 'tm_hour' => 7,
+ 'tm_mday' => 13,
+ 'tm_mon' => 4,
'tm_year' => 205,
- 'tm_wday' => 5,
- 'tm_yday' => 93,
- 'tm_isdst' => 1
);
$localtime_arr3 = array (
- '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
+ 'tm_sec' => 11,
+ 'tm_min' => 13,
+ 'tm_hour' => 0,
+ 'tm_mday' => 17,
+ 'tm_mon' => 11,
+ 'tm_year' => -5
);
$localtime_arr = array (
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,'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);
+ $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN);
$formatted = ut_datefmt_format( $fmt , $timestamp_entry);
$res_str .= "\nFormatted timestamp is : $formatted";
}
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);
+ $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry, $timezone, IntlDateFormatter::GREGORIAN );
$formatted1 = ut_datefmt_format( $fmt , $localtime_entry);
if( intl_get_error_code() == U_ZERO_ERROR){
$res_str .= "\nFormatted localtime_array is : $formatted1";
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT
+Formatted timestamp is : Wednesday, December 31, 1969 2:00:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 31, 1969 4:00:00 PM PST
+Formatted timestamp is : December 31, 1969 2:00:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 31, 1969 4:00:00 PM
+Formatted timestamp is : Dec 31, 1969 2:00:00 PM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted timestamp is : 12/31/69 4:00 PM
+Formatted timestamp is : 12/31/69 2:00 PM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 19691231 04:00 PM
+Formatted timestamp is : 19691231 02:00 PM
------------
Input timestamp is : -1200000
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT
+Formatted timestamp is : Wednesday, December 17, 1969 4:40:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 17, 1969 6:40:00 PM PST
+Formatted timestamp is : December 17, 1969 4:40:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 17, 1969 6:40:00 PM
+Formatted timestamp is : Dec 17, 1969 4:40:00 PM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted timestamp is : 12/17/69 6:40 PM
+Formatted timestamp is : 12/17/69 4:40 PM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 19691217 06:40 PM
+Formatted timestamp is : 19691217 04:40 PM
------------
Input timestamp is : 1200000
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT
+Formatted timestamp is : Wednesday, January 14, 1970 11:20:00 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : January 14, 1970 1:20:00 PM PST
+Formatted timestamp is : January 14, 1970 11:20:00 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Jan 14, 1970 1:20:00 PM
+Formatted timestamp is : Jan 14, 1970 11:20:00 AM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted timestamp is : 1/14/70 1:20 PM
+Formatted timestamp is : 1/14/70 11:20 AM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 19700114 01:20 PM
+Formatted timestamp is : 19700114 11:20 AM
------------
Input timestamp is : 2200000000
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Sunday, September 18, 2039 4:06:40 PM PT
+Formatted timestamp is : Sunday, September 18, 2039 1:06:40 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : September 18, 2039 4:06:40 PM PDT
+Formatted timestamp is : September 18, 2039 1:06:40 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Sep 18, 2039 4:06:40 PM
+Formatted timestamp is : Sep 18, 2039 1:06:40 PM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted timestamp is : 9/18/39 4:06 PM
+Formatted timestamp is : 9/18/39 1:06 PM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 20390918 04:06 PM
+Formatted timestamp is : 20390918 01:06 PM
------------
Input timestamp is : -2200000000
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Saturday, April 14, 1900 5:53:20 PM PT
+Formatted timestamp is : Saturday, April 14, 1900 2:53:20 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : April 14, 1900 5:53:20 PM PDT
+Formatted timestamp is : April 14, 1900 2:53:20 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Apr 14, 1900 5:53:20 PM
+Formatted timestamp is : Apr 14, 1900 2:53:20 PM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted timestamp is : 4/14/00 5:53 PM
+Formatted timestamp is : 4/14/00 2:53 PM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 19000414 05:53 PM
+Formatted timestamp is : 19000414 02:53 PM
------------
Input timestamp is : 90099999
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT
+Formatted timestamp is : Wednesday, November 8, 1972 9:46:39 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : November 8, 1972 11:46:39 AM PST
+Formatted timestamp is : November 8, 1972 9:46:39 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Nov 8, 1972 11:46:39 AM
+Formatted timestamp is : Nov 8, 1972 9:46:39 AM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted timestamp is : 11/8/72 11:46 AM
+Formatted timestamp is : 11/8/72 9:46 AM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 19721108 11:46 AM
+Formatted timestamp is : 19721108 09:46 AM
------------
Input timestamp is : 3600
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT
+Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 31, 1969 5:00:00 PM PST
+Formatted timestamp is : December 31, 1969 3:00:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 31, 1969 5: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 5:00 PM
+Formatted timestamp is : 12/31/69 3:00 PM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 19691231 05:00 PM
+Formatted timestamp is : 19691231 03:00 PM
------------
Input timestamp is : -3600
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT
+Formatted timestamp is : Wednesday, December 31, 1969 1:00:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 31, 1969 3:00:00 PM PST
+Formatted timestamp is : December 31, 1969 1:00:00 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 31, 1969 3:00:00 PM
+Formatted timestamp is : Dec 31, 1969 1: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 1:00 PM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted timestamp is : 19691231 03:00 PM
+Formatted timestamp is : 19691231 01:00 PM
------------
-Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' , tm_wday : '0' , tm_yday : '93' , tm_isdst : '1' ,
+Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' ,
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM PT
+Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted localtime_array is : April 3, 2005 7:03:24 PM PDT
+Formatted localtime_array is : April 3, 2005 7:03:24 PM GMT-10:00
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
Formatted localtime_array is : 20050403 07:03 PM
------------
-Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '205' , tm_wday : '5' , tm_yday : '93' , tm_isdst : '1' ,
+Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '4' , tm_year : '205' ,
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted localtime_array is : Friday, April 3, 2105 3:03:24 AM PT
+Formatted localtime_array is : Wednesday, May 13, 2105 7:05:21 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted localtime_array is : April 3, 2105 3:03:24 AM PDT
+Formatted localtime_array is : May 13, 2105 7:05:21 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted localtime_array is : Apr 3, 2105 3:03:24 AM
+Formatted localtime_array is : May 13, 2105 7:05:21 AM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted localtime_array is : 4/3/05 3:03 AM
+Formatted localtime_array is : 5/13/05 7:05 AM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted localtime_array is : 21050403 03:03 AM
+Formatted localtime_array is : 21050513 07:05 AM
------------
-Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_mday : '3' , tm_mon : '3' , tm_year : '-5' , tm_wday : '3' , tm_yday : '93' , tm_isdst : '1' ,
+Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' ,
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted localtime_array is : Wednesday, April 3, 1895 3:03:24 AM PT
+Formatted localtime_array is : Tuesday, December 17, 1895 12:13:11 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted localtime_array is : April 3, 1895 3:03:24 AM PDT
+Formatted localtime_array is : December 17, 1895 12:13:11 AM GMT-10:00
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted localtime_array is : Apr 3, 1895 3:03:24 AM
+Formatted localtime_array is : Dec 17, 1895 12:13:11 AM
IntlDateFormatter locale= en_US ,datetype = 3 ,timetype =3
-Formatted localtime_array is : 4/3/95 3:03 AM
+Formatted localtime_array is : 12/17/95 12:13 AM
IntlDateFormatter locale= en_US ,datetype = -1 ,timetype =-1
-Formatted localtime_array is : 18950403 03:03 AM
+Formatted localtime_array is : 18951217 12:13 AM
\ No newline at end of file
function ut_main()
{
+ $timezone = 'GMT+5';
+
$locale_arr = array (
'en_US'
);
'tm_mday' => 3,
'tm_mon' => 3,
'tm_year' => 105,
- 'tm_wday' => 0,
- 'tm_yday' => 93,
- 'tm_isdst' => 1
);
$localtime_arr2 = array (
- 'tm_sec' => 24 ,
- 'tm_min' => 3,
- 'tm_hour' => 3,
- 'tm_mday' => 3,
- 'tm_mon' => 3,
+ 'tm_sec' => 21,
+ 'tm_min' => 5,
+ 'tm_hour' => 7,
+ 'tm_mday' => 13,
+ 'tm_mon' => 7,
'tm_year' => 205,
- 'tm_wday' => 5,
- 'tm_yday' => 93,
- 'tm_isdst' => 1
);
$localtime_arr3 = array (
- '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
+ 'tm_sec' => 11,
+ 'tm_min' => 13,
+ 'tm_hour' => 0,
+ 'tm_mday' => 17,
+ 'tm_mon' => 11,
+ 'tm_year' => -5
);
$localtime_arr = array (
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,'America/Los_Angeles', IntlDateFormatter::GREGORIAN );
+ $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone);
$formatted = ut_datefmt_format( $fmt , $timestamp_entry);
$res_str .= "\nFormatted timestamp is : $formatted";
$parsed = ut_datefmt_parse( $fmt , $formatted);
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);
+ $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry,$timezone);
$formatted1 = ut_datefmt_format( $fmt , $localtime_entry);
if( intl_get_error_code() == U_ZERO_ERROR){
$res_str .= "\nFormatted localtime_array is : $formatted1";
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 31, 1969 4:00:00 PM PT
+Formatted timestamp is : Thursday, January 1, 1970 5:00:00 AM GMT+05:00
Parsed timestamp is : 0
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 31, 1969 4:00:00 PM PST
+Formatted timestamp is : January 1, 1970 5:00:00 AM GMT+05:00
Parsed timestamp is : 0
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 31, 1969 4:00:00 PM
+Formatted timestamp is : Jan 1, 1970 5:00:00 AM
Parsed timestamp is : 0
------------
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 17, 1969 6:40:00 PM PT
+Formatted timestamp is : Thursday, December 18, 1969 7:40:00 AM GMT+05:00
Parsed timestamp is : -1200000
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 17, 1969 6:40:00 PM PST
+Formatted timestamp is : December 18, 1969 7:40:00 AM GMT+05:00
Parsed timestamp is : -1200000
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 17, 1969 6:40:00 PM
+Formatted timestamp is : Dec 18, 1969 7:40:00 AM
Parsed timestamp is : -1200000
------------
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, January 14, 1970 1:20:00 PM PT
+Formatted timestamp is : Thursday, January 15, 1970 2:20:00 AM GMT+05:00
Parsed timestamp is : 1200000
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : January 14, 1970 1:20:00 PM PST
+Formatted timestamp is : January 15, 1970 2:20:00 AM GMT+05:00
Parsed timestamp is : 1200000
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Jan 14, 1970 1:20:00 PM
+Formatted timestamp is : Jan 15, 1970 2:20:00 AM
Parsed timestamp is : 1200000
------------
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Sunday, September 18, 2039 4:06:40 PM PT
+Formatted timestamp is : Monday, September 19, 2039 4:06:40 AM GMT+05:00
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 18, 2039 4:06:40 PM PDT
+Formatted timestamp is : September 19, 2039 4:06:40 AM GMT+05:00
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 18, 2039 4:06:40 PM
+Formatted timestamp is : Sep 19, 2039 4:06:40 AM
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 = 0 ,timetype =0
-Formatted timestamp is : Saturday, April 14, 1900 5:53:20 PM PT
+Formatted timestamp is : Sunday, April 15, 1900 5:53:20 AM GMT+05:00
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 14, 1900 5:53:20 PM PDT
+Formatted timestamp is : April 15, 1900 5:53:20 AM GMT+05:00
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 14, 1900 5:53:20 PM
+Formatted timestamp is : Apr 15, 1900 5:53:20 AM
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 = 0 ,timetype =0
-Formatted timestamp is : Wednesday, November 8, 1972 11:46:39 AM PT
+Formatted timestamp is : Thursday, November 9, 1972 12:46:39 AM GMT+05:00
Parsed timestamp is : 90099999
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : November 8, 1972 11:46:39 AM PST
+Formatted timestamp is : November 9, 1972 12:46:39 AM GMT+05:00
Parsed timestamp is : 90099999
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Nov 8, 1972 11:46:39 AM
+Formatted timestamp is : Nov 9, 1972 12:46:39 AM
Parsed timestamp is : 90099999
------------
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 31, 1969 5:00:00 PM PT
+Formatted timestamp is : Thursday, January 1, 1970 6:00:00 AM GMT+05:00
Parsed timestamp is : 3600
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 31, 1969 5:00:00 PM PST
+Formatted timestamp is : January 1, 1970 6:00:00 AM GMT+05:00
Parsed timestamp is : 3600
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 31, 1969 5:00:00 PM
+Formatted timestamp is : Jan 1, 1970 6:00:00 AM
Parsed timestamp is : 3600
------------
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted timestamp is : Wednesday, December 31, 1969 3:00:00 PM PT
+Formatted timestamp is : Thursday, January 1, 1970 4:00:00 AM GMT+05:00
Parsed timestamp is : -3600
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted timestamp is : December 31, 1969 3:00:00 PM PST
+Formatted timestamp is : January 1, 1970 4:00:00 AM GMT+05:00
Parsed timestamp is : -3600
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted timestamp is : Dec 31, 1969 3:00:00 PM
+Formatted timestamp is : Jan 1, 1970 4:00:00 AM
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' , tm_wday : '0' , tm_yday : '93' , tm_isdst : '1' ,
+Input localtime is : tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_mday : '3' , tm_mon : '3' , tm_year : '105' ,
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted localtime_array is : Sunday, April 3, 2005 7:03:24 PM PT
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted localtime_array is : April 3, 2005 7:03:24 PM PDT
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
Formatted localtime_array is : Apr 3, 2005 7:03:24 PM
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '19' , tm_year : '105' , tm_mday : '3' , tm_wday : '0' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
------------
-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' ,
+Input localtime is : tm_sec : '21' , tm_min : '5' , tm_hour : '7' , tm_mday : '13' , tm_mon : '7' , tm_year : '205' ,
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted localtime_array is : Friday, April 3, 2105 3:03:24 AM PT
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted localtime_array is : April 3, 2105 3:03:24 AM PDT
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted localtime_array is : Apr 3, 2105 3:03:24 AM
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '205' , tm_mday : '3' , tm_wday : '5' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
------------
-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' ,
+Input localtime is : tm_sec : '11' , tm_min : '13' , tm_hour : '0' , tm_mday : '17' , tm_mon : '11' , tm_year : '-5' ,
------------
IntlDateFormatter locale= en_US ,datetype = 0 ,timetype =0
-Formatted localtime_array is : Wednesday, April 3, 1895 3:03:24 AM PT
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
IntlDateFormatter locale= en_US ,datetype = 1 ,timetype =1
-Formatted localtime_array is : April 3, 1895 3:03:24 AM PDT
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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' ,
IntlDateFormatter locale= en_US ,datetype = 2 ,timetype =2
-Formatted localtime_array is : Apr 3, 1895 3:03:24 AM
-Parsed array is: tm_sec : '24' , tm_min : '3' , tm_hour : '3' , tm_year : '-5' , tm_mday : '3' , tm_wday : '3' , tm_yday : '93' , tm_mon : '3' , tm_isdst : '1' ,
+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
* 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()
{
1234999, // bad one
);
+ $integer = array(
+ NumberFormatter::ORDINAL => '',
+ NumberFormatter::DURATION => '',
+ );
$locales = array(
'en_US',
'ru_UA',
'de',
+ 'fr',
'en_UK'
);
foreach( $locales as $locale )
{
- $str_res .= "\n Locale is: $locale\n";
+ $str_res .= "\nLocale is: $locale\n";
foreach( $styles as $style => $pattern )
{
$fmt = ut_nfmt_create( $locale, $style, $pattern );
$str_res .= "Bad formatter!\n";
continue;
}
- $str_res .= dump_str( ut_nfmt_format( $fmt, $number ) ) . "\n";
+ $str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
}
}
return $str_res;
ut_run();
?>
---EXPECT--
+--EXPECTREGEX--
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,568th'
-'342:56:08'
+'1,234,567th'
+'342:56:07'
'#####.###'
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 568'
-'1 234 568'
+'1 234 567'
+'1 234 567'
'#####.###'
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.568'
-'1.234.568'
+'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'
'#####.###'
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,568th'
-'342:56:08'
+'1,234,567th'
+'342:56:07'
'#####.###'
-Bad formatter!
+Bad formatter!
\ No newline at end of file
/*
* 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()
foreach( $locales as $locale => $currency )
{
$fmt = ut_nfmt_create( $locale, NumberFormatter::CURRENCY );
- $res_str .= "$locale: " . dump_str( ut_nfmt_format_currency( $fmt, $number, $currency ) ) . "\n";
+ $res_str .= "$locale: " . var_export( ut_nfmt_format_currency( $fmt, $number, $currency ), true ) . "\n";
}
return $res_str;
}
ut_run();
?>
---EXPECT--
+--EXPECTREGEX--
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'
+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
$locales = array(
'en_UK',
'en_US@California',
- 'uk',
+ 'fr_CA',
);
$loc_types = array(
--EXPECT--
en_UK: actual='en' valid='en'
en_US@California: actual='en' valid='en'
-uk: actual='root' valid='uk'
+fr_CA: actual='fr_CA' valid='fr_CA'
ut_run();
?>
---EXPECT--
-Default pattern: '#.#####################################################################################################################################################################################################################################################################################################################'
+--EXPECTF--
+Default pattern: '#.####################################################################################################################################################################################################################################################################################################################%s'
Formatting result: 12345.123456
New pattern: '#0.0'
Formatted number: 12345.1
--TEST--
locale_get_display_language()
---INI--
-unicode.runtime_encoding="utf-8"
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
ut_run();
?>
---EXPECT--
+--EXPECTREGEX--
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_language=Ukrainian
disp_locale=fr : display_language=ukrainien
locale='root'
disp_locale=en : display_language=Root
disp_locale=fr : display_language=racine
-disp_locale=de : display_language=root
+disp_locale=de : display_language=[rR]oot
-----------------
locale='uk@currency=EURO'
disp_locale=en : display_language=Ukrainian
--TEST--
locale_get_display_name()
---INI--
-unicode.runtime_encoding="utf-8"
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
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";
}
ut_run();
?>
---EXPECT--
+--EXPECTREGEX--
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)
+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)#
-----------------
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
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
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, 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)
+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#
-----------------
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
-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)
+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#
-----------------
locale='root'
disp_locale=en : display_name=Root
disp_locale=fr : display_name=racine
-disp_locale=de : display_name=root
+disp_locale=de : display_name=[Rr]oot
-----------------
locale='uk@currency=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)
+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#
-----------------
locale='Hindi'
disp_locale=en : display_name=hindi
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 And 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 [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#
-----------------
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)
+disp_locale=en : display_name=Slovenian #ROZAJ#
+disp_locale=fr : display_name=slovène #ROZAJ#
+disp_locale=de : display_name=Slowenisch #(ROZAJ|Resianisch)#
-----------------
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)
+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)#
-----------------
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)
+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)#
-----------------
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)
+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)#
-----------------
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
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 And 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 [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#
-----------------
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#
-----------------
--TEST--
locale_get_display_region()
---INI--
-unicode.runtime_encoding="utf-8"
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
ut_run();
?>
---EXPECT--
+--EXPECTREGEX--
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_region=Ukraine
disp_locale=fr : display_region=Ukraine
disp_locale=de : display_region=China
-----------------
locale='sr-Latn-CS'
-disp_locale=en : display_region=Serbia And Montenegro
+disp_locale=en : display_region=Serbia [Aa]nd Montenegro
disp_locale=fr : display_region=Serbie-et-Monténégro
disp_locale=de : display_region=Serbien und Montenegro
-----------------
disp_locale=de : display_region=QM
-----------------
locale='sr-Qaaa-CS'
-disp_locale=en : display_region=Serbia And Montenegro
+disp_locale=en : display_region=Serbia [Aa]nd Montenegro
disp_locale=fr : display_region=Serbie-et-Monténégro
disp_locale=de : display_region=Serbien und Montenegro
-----------------
--TEST--
locale_get_display_script()
---INI--
-unicode.runtime_encoding="utf-8"
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
disp_locale=en : display_script=
disp_locale=fr : display_script=
disp_locale=de : display_script=
------------------
+-----------------
\ No newline at end of file
--TEST--
locale_get_display_variant()
---INI--
-unicode.runtime_encoding="utf-8"
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
ut_run();
?>
---EXPECT--
+--EXPECTREGEX--
locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
disp_locale=en : display_variant=CALIFORNIA
disp_locale=fr : display_variant=CALIFORNIA
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
+disp_locale=de : display_variant=(1901|alte deutsche Rechtschreibung)
-----------------
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
+disp_locale=de : display_variant=(NEDIS|Natisone-Dialekt)
-----------------
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
+disp_locale=de : display_variant=(NEDIS|Natisone-Dialekt)
-----------------
locale='de-DE'
disp_locale=en : display_variant=