ZF-7922: Zend_Locale_Format::getFloat() throws Exception if input has only fractional digits

Issue Type: Improvement Created: 2009-09-22T08:54:37.000+0000 Last Updated: 2009-09-25T02:36:08.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Sebastian Kors (skors) Assignee: Thomas Weidner (thomas) Tags: - Zend_Locale

Related issues: Attachments:



<pre class="highlight">
echo Zend_Locale_Format::getFloat('.99',array('precision' => 2, 'locale' => 'en_GB' ));


bq. No localized value in .99 found, or the given number does not match the localized format


Posted by Sebastian Kors (skors) on 2009-09-22T08:58:28.000+0000

ups, wrong button hit...

My first thought was to edit the pattern in the locales XML, but had no success. So my solution isn't appended, in cause of only checking the first char if it matches numbers->symbols->decimal of the locale XML. Adding a pattern didn't work for me.

Thanks in advance,

Sebastian Kors

Posted by Thomas Weidner (thomas) on 2009-09-22T10:14:16.000+0000

This is not an issue.

According to CLDR a floating number MUST have a leading digit. This makes "0.99" an valid float, but ".99" not...

This is also true for patterns... the first char must be a digit.

Posted by Sebastian Kors (skors) on 2009-09-24T09:27:48.000+0000

Hello Thomas,

thanks for the reply and for clarification on this issue. I didn't recognized the CLDR point.


Posted by Thomas Weidner (thomas) on 2009-09-25T02:36:00.000+0000

Allowed with r18406

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.