Skip to content

Problem with float canonization #1

@danielmarschall

Description

@danielmarschall

Hello,
In src/Utils.php at method es6NumberFormat(), I have found these two lines:

        $formatted = rtrim($formatted, '.0');

and

        $parts[0] = rtrim($parts[0], '.0');

I think they are not doing what they are intended for. Here, all "0" and "." are removed from the right side of the string.
But zeros left to the decimal point will be removed too. This means that the number 1230.0000 will become 123 and not 1230.

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