javascript - Globalize formatDate the function returns "numberSymbol is not a function" -


i tried same example: https://gist.github.com/rxaviers/9fec3ae0dfb7cdb0a0ce

when trying use: en.formatdate(new date(), { datetime: "medium" }); typeerror: numbersymbol not function

stacktrace

date.js:593 uncaught typeerror: numbersymbol not functionmessage: "numbersymbol not function"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: errordateformatproperties @ date.js:593globalize.dateformatter.globalize.dateformatter @ date.js:1749globalize.formatdate.globalize.formatdate @ date.js:1820(anonymous function) @ vm1310:2injectedscript._evaluateon @ vm1265:883injectedscript._evaluateandwrap @ vm1265:816injectedscript.evaluate @ vm1265:682 

versions: globalize 1.0.0 , cldrjs 0.4.1

cldr json data got https://github.com/unicode-cldr

there's no information error, got same error message today , figured out importing javascript files out of order (yes, have specific order). noticed behavior after looking same example many times: plain javascript example.

the code extracted example:

<script src="../../dist/globalize.js"></script> <script src="../../dist/globalize/message.js"></script> <script src="../../dist/globalize/number.js"></script> <script src="../../dist/globalize/plural.js"></script>  <!-- load after globalize/number.js --> <script src="../../dist/globalize/date.js"></script> <!-- trick--> <script src="../../dist/globalize/currency.js"></script>  <!-- load after globalize/number.js , globalize/plural.js--> <script src="../../dist/globalize/relative-time.js"></script> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -