UNPKG

phpjs

Version:

php.js offers community built php functions in javascript

57 lines (43 loc) 2.54 kB
<!-- Generated by Rakefile:build --> <strong> <a href="http://kevin.vanzonneveld.net" rel="nofollow">Kevin van Zonneveld</a> </strong> on 2009-10-25 13:44:55 <br /> @ Brett Zamir: Did I mention yet you were the man? Well, you are. <hr /> <strong> <a href="http://brett-zamir.me" rel="nofollow">Brett Zamir</a> </strong> on 2009-10-16 02:35:42 <br /> @daniel: I believe I have fixed the two issues you raised. One was due to regular expression functions giving the empty string in Firefox and &quot;undefined&quot; in IE for missing arguments (was only checking for empty string), while the other problem was due to the fact that I was adding the thousands separator with numbers less than a thousand (thus the comma). These should now both be fixed in Git: http://github.com/kvz/phpjs/commit/2a379948ebd70f40a017f43b4e5127447484eebb . There are two other issues possibly remaining: 1) PHP, as I recall, may differ in the default (English) locale as to whether &quot;USD&quot; is used for the international currency default or nothing. In our setlocale() implementation, it does. This is set in the line: <pre><code>phpjs.locales.en_US.LC_MONETARY.int_curr_symbol</code></pre> We should probably look into which locales use this and which use nothing as the &quot;international&quot; symbol. 2) I understood from the documentation that padding should be left to make space for alignment with numbers which have a (negative) sign, so there is a space added (perhaps in the wrong place too) at the beginning of the number, whereas in PHP, it doesn't seem to add a space. I only put out money_format() recently, and I didn't find the documentation out there particularly clear, so it wouldn't surprise me if there are a few bugs left to work out. Hopefully, it is close enough to be worth fixing the bugs as they're discovered. <hr /> <strong> <a href="http://wermann.com.br" rel="nofollow">daniel airton wermann</a> </strong> on 2009-10-14 19:09:19 <br /> A bug occurs when use it on Internet Explorer. I don't know what the problem, but the returns of the function in IE doesn't the same as on Firefox for example. In IE: <pre><code>3,590.</code></pre> In FF: <pre><code>3,590.00</code></pre> Second bug, please help! <hr /> <strong> <a href="http://wermann.com.br" rel="nofollow">daniel airton wermann</a> </strong> on 2009-10-14 16:45:28 <br /> Hi! Excuse me, but I've found a bug (or not?). Look this: <pre><code>money_format('%i', 134.56);</code></pre> It's returns: <pre><code>USD ,134.56</code></pre> Anybody help me? <hr />