codebox / moment-precise-range

A moment.js plugin to display human-readable date/time ranges
https://codebox.net/pages/moment-date-range-plugin
MIT License
150 stars 91 forks source link

Use `moment().subtract(number, period)` syntax to eliminate deprecation warning #7

Closed ghost closed 9 years ago

ghost commented 9 years ago

Currently, using the preciseDiff method with the latest version of Moment (2.10.2) produces this deprecation warning in the console:

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

This pull request switches to the moment().subtract(number, period) syntax, which eliminates the warning.

codebox commented 9 years ago

Thanks!