Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moment.lang deprecated #11

Closed
boennemann opened this issue Nov 6, 2014 · 1 comment
Closed

moment.lang deprecated #11

boennemann opened this issue Nov 6, 2014 · 1 comment

Comments

@boennemann
Copy link
Collaborator

As of moment@2.8.1 moment.lang is deprecated and was replaced by moment.locale. http://momentjs.com/docs/#/i18n/changing-locale/

As one may provide their own instance of moment this may cause issues.

There are two possible ways to fix this:

  1. Bump the moment dependency from ~2.0.0 to ^2.8.1 and use moment.locale
var locale = typeof moment.locale === 'function' ? 'locale' : 'lang'
// …
moment[locale]('en')

Changing ~2.0.0 to ^2.0.0 would still be recommended though.

What do you think? Not so sure, but I think I prefer 2.

@seidtgeist
Copy link
Owner

I also prefer version 2 and yes let's change the version to ^2.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants