Number Normalization for Zend Framework 2

2019-08-31 05:51发布

问题:

I'm trying to normalize a number from a form, which will/could be in the local number format. e.g.

Locale:en-US
1,234.56 -> 1234.56

Locale:nl-NL
1.234,56 -> 1234.56

Is there an equivalent in ZF2 to the ZF1 Zend_Locale_Format::getNumber?

Thanks in advance

Aborgrove.

回答1:

You mean something like the numberFormat Filter?