how to switch rounding off
See original GitHub issueHi, when I use the numeral I want to format the number to 0.00a but it’s rounding the last digit, I don’t want to do the rounding and I don’t find any document about it.
value: 4986444.0
format: $0.00a
return: $4.99m
expected: $4.98m
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Round a number to the decimal places I want - Microsoft Support
In number, type the number you are rounding down. In num_digits, type 0 to round the number up to the nearest whole number....
Read more >How to Get Excel to Stop Rounding Your Numbers | Excelchat
To stop Excel from rounding currencies, format the decimal places to “3 or more”. This way, the precision and accuracy of our data...
Read more >Rounding Numbers - Math is Fun
How to Round Numbers · Decide which is the last digit to keep · Leave it the same if the next digit is...
Read more >Rules for Rounding Off - Chemteam.info
We can correct for this problem by changing the rule for rounding 5 rounding "off" (keeping the number the same) in fifty percent...
Read more >Rounding Numbers Calculator
Rounding calculator to round numbers up or down to any decimal place. Choose ones to round a number to the nearest dollar. Choose...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

numeral().format()accepts a 2nd parameter which is the rounding function to use.In your case, you probably want Math.floor -
numeral(4986444.0).format('0.00a', Math.floor)You can also use bitwise negation like this
numeral(4986444.0).format('0.00a', n => ~~n)I hope this helps