[TIMOB-1407] Android: Number.toString() returns decimal "1.0"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-26T20:35:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.8.3 |
Components | Android |
Labels | android, defect |
Reporter | Don Thorp |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:51:26.000+0000 |
Updated | 2017-03-06T23:49:56.000+0000 |
Description
Review the ECMA spec: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf"> http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-2... to see the rules on Number.toString().
Workaround: If you know the number you want is an integer, you use Math.floor(mynumber) instead of relying on the underlying JS's toString on every platform. We return a double from Titanium which is getting formatted as such.
This looks to be resolved for both Rhino and V8.
Closing ticket due to time passed.