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

Description

Hi,


echo Zend_Locale_Format::getFloat('.99',array('precision' => 2, 'locale' => 'en_GB' ));

returns

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

Comments

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

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.

Hello Thomas,

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

thanks.

Allowed with r18406