Numeral-js: Change instance language / locale locally

Created on 22 Nov 2013  路  6Comments  路  Source: adamwdraper/Numeral-js

I wonder whether something like this is possible with Numeral? It is something that I need to use in an app that I am building.

Most helpful comment

It's not necessary a breaking change. It could be just a new feature for v2.1.

I was talking about the breaking changes in 2.0.0. Since it breaked there, it could introduce it there.

I agree with you, I use moment and numeral and love how moment works.

All 6 comments

Yes, this would be very helpful for me so count my vote to do this too. :+1 :)

This is kind of old, any thoughts on this?
I was searching for a library with this feature. Maybe I could help to implement.

This should have been in version 2 since it's breaking locale, it would be nice to have the locale stored in Numeral object and not globally. For an app with multiple users with different locales it sucks to always have to change local right before formatting..

It's not necessary a breaking change. It could be just a new feature for v2.1.

I like the way Moment.js handles it.

// global
moment.locale('en');

// instance
moment('2016-12-20').locale('pt-br').[...]

It's not necessary a breaking change. It could be just a new feature for v2.1.

I was talking about the breaking changes in 2.0.0. Since it breaked there, it could introduce it there.

I agree with you, I use moment and numeral and love how moment works.

I want to use numeral for number parsing. Sometime, I need to assign particular locale when doing number parsing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rvanmil picture rvanmil  路  4Comments

zzzgit picture zzzgit  路  5Comments

anselms picture anselms  路  4Comments

GitzJoey picture GitzJoey  路  4Comments

fabien-h picture fabien-h  路  9Comments