Edit report at http://bugs.php.net/bug.php?id=54163&edit=1

 ID:                 54163
 Updated by:         [email protected]
 Reported by:        lingtalfi at gmail dot com
 Summary:            get NaN with intl MessageFormatter or
                     NumberFormatter
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            I18N and L10N related
 Operating System:   MacOsX 10.6.6
 PHP Version:        5.3.5
 Block user comment: N
 Private report:     N

 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------
[2011-03-05 14:01:53] lingtalfi at gmail dot com

Maybe you don't have the same os or config ?

lucky you.

------------------------------------------------------------------------
[2011-03-05 13:50:12] [email protected]

I can't reproduce it.



"Le samedi 5 mars 2011 à 09:49, 5 pommes coûtent 3,00 €

On Saturday, March 5, 2011 at 9:49 AM, 5 apples cost $3.00"

------------------------------------------------------------------------
[2011-03-05 06:41:48] lingtalfi at gmail dot com

$data = array(time(), time(), 5, 3);

------------------------------------------------------------------------
[2011-03-05 02:23:23] Louis dot cellier at hotmail dot com

Don't want to be rude. Can you show your array $data used on this
exemple ?

------------------------------------------------------------------------
[2011-03-04 22:42:02] lingtalfi at gmail dot com

Description:
------------
Hi, I use macport php5.3 and intl



my configuration 

Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/1.0.0d DAV/2 PHP/5.3.5 



trying intl functions, I get NaN value instead of expected (int) value.

Also had similar issue with NumberFormatter.

Test script:
---------------
    $format_FR = 'Le {0,date,full} à {1,time,short}, {2,number,integer}
pommes coûtent {3,number,currency}';

    $format_US = 'On {0,date,full} at {1,time,short}, {2,number,integer}
apples cost {3,number,currency}';

    $data = array(time(), time(), 5, 3);

    echo MessageFormatter::formatMessage('fr_FR', $format_FR, $data) .
"<br />";

    echo MessageFormatter::formatMessage('en_US', $format_US, $data) .
"<br />";

Expected result:
----------------
Le vendredi 4 mars 2011 à 22:37, 5 pommes coûtent 3 €

On Friday, March 4, 2011 at 10:37 PM, 5 apples cost $3



Actual result:
--------------
Le vendredi 4 mars 2011 à 22:37, 5 pommes coûtent NaN

On Friday, March 4, 2011 at 10:37 PM, 5 apples cost NaN


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54163&edit=1

Reply via email to