This project is archived and is in readonly mode.

#526 ✓invalid
Robin Summerhill

Number.format ignores {decimals:0}

Reported by Robin Summerhill | February 26th, 2011 @ 04:04 PM | in 1.4.0.1 (closed)

To format a number as an integer you should be able to use {decimals:0} as a formatting option for Number.format.

Something like this could be added to Number.format:
if (typeof(decimals) == 'number' && (decimals >= 0 && decimals <= 20)) value = value.toFixed(decimals);

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket

Pages