javascript - Google's closure library giving some strange symbols using NumberFormat -
i'm trying familiarise myself basics of library, printing result of computation console. when doing so, in more 1 of supported locales, result is... interesting. in example, instead of being £200.58 in fact £200.58 has else encountered this?
my code:
<!doctype html> <html> <script src="closure-library/closure/goog/base.js"></script> <script> goog.require('goog.i18n.numberformat'); </script> <script> goog.i18n.numberformatsymbols = goog.i18n.numberformatsymbols_en_gb; var formatter = new goog.i18n.numberformat(goog.i18n.numberformat.format.currency); console.log(formatter.format(200.58)); </script> </html>
Comments
Post a Comment