Skip to content

toFormat not respecting 'rm' passed in #5

@juviasuisei

Description

@juviasuisei

I expected it to just inherit from the Decimal config (unsure if the fact that it didn't is itself another bug) but even when I passed in a rm explicitly it ignored it.

Code samples of the problem (I'm running Decimal 10.2.0 and toFormat 2.0.0):

Decimal.set({'rounding': 6});
toFormat(Decimal);
n = new Decimal('1234.5');
n.toFormat()
Expected: 1,234
Result: 1,235

n.toFormat(0, rm=6)
Expected: 1,234
Result: 1,235

Let me know if there is anything I can do to help troubleshoot! Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions