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

mitigate deprecation warnings #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmetzler
Copy link

newer versions of moment.js print this warning to the console:

moment().add('h',3)
Deprecation warning: moment().add(period, number) is deprecated. Please use moment().add(number, period).

moment().subtract('d',3)
Deprecation warning: moment().subtract(period, number) is deprecated. Please use moment().subtract(number, period).

newer versions of moment.js print this warning to the console:
```
moment().add('h',3)
Deprecation warning: moment().add(period, number) is deprecated. Please use moment().add(number, period).

moment().subtract('d',3)
Deprecation warning: moment().subtract(period, number) is deprecated. Please use moment().subtract(number, period).
```
@rmetzler
Copy link
Author

Thinking about this PR I came to the conclusion that it might be not that good to break interoperability with older versions of moment.js.

@jaythomas
Copy link

I know this is an old PR and this repository is clearly dead, but since this PR is still open I'll take the liberty to comment on it.

I think this plugin needs versioning first so that calls like that can be made. "momentjs-business x.x" is only compatible with "moment x.x".

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

Successfully merging this pull request may close these issues.

2 participants