Formatting Decimal Numbers

Anonymous avatarAnonymous created an issue

BUG 1: When trying to format 5.1 to {0:0.00} it will return 5.00 instead of 5.10

BUG 2: When trying to format 5.1 to {0:0.##} it will return 5 instead of 5.1

INFO you can try this from your test with the changed values:

alert(String.format('@{a:##} and @{b:00}', { a: 5.2, b: 6.1 }));

Comments (1)

  1. Kamyar Inanloo

    The first bug is fixed: When starting the fractional part of decimal formatter with zero, the result is not correct. The second bug is not reproducible. please test again.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.