Format Number similar to `toLocaleString()`

Hello.

I was wondering if there is a number formatting in Elm core library. I couldn’t find it (saw several community packages that do it).

I want to format numbers similar to JavaScripts’ myNum.toLocaleString().

Thank you.

Have you seen elm-format-number ?

1 Like

Yes, I’ve seen it.

I was hoping that Elm has it built in.

Thank you @pdamoc .

Maybe custom elements could be a solution ?

2 Likes

Hi @Laurent,

That’s a very interesting idea! I like it.

Thank you.

1 Like

Interesting to see, that you “hang” at a similar point like me some time ago: https://github.com/hans-helmut/elm-timei18n

Using formats based system settings isn’t always that great though. We had an issue with some users being confused and failing to complete our forms, because they didn’t understand that the time inputs were using AM/PM instead of 24h, because of their own device’s locale settings :stuck_out_tongue:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.