Skip to content

Support for local decimal separator #35

Open
@piotr-musialek-skyrise

Description

How can I set what is treated as a decimal separator? I can easily add support for units in more languages, but half of the world uses comma as a decimal separator and I can't seem to find a way to switch it.

Right now:
parse('1.500 seconds') - resulting in one and a half second
parse('1,500 seconds') - resulting in one and a half thousand seconds

I need:
parse('1,500 seconds') - resulting in one and a half second

I understand that it's impossible to parse it both ways, but at least what we could have is a way to override the decimal separator based on our language we use in our apps. Maybe similar to how we add language specific units?
parse['decimalSeparator'] = ',';

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