-
Notifications
You must be signed in to change notification settings - Fork 70
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
Annoying moment.js deprecation warning #25
Comments
+1 |
2 similar comments
+1 |
👍 |
Will fix in v2.0. |
This wasn't working for me, had to change Line 19 to be
you have to use UPDATE: If I use UNIX_TIMESTAMP(time) from MySQL, I don't need the unix, but if I convert the date in the application with coldfusion, I do need it. |
So long to change this simple fix! +1 |
Submitted Pull Request #55 for those that want an easy solution. In short, Moment.js no longer likes dates as strings ... so they need to be converted into an object first. Quick three line change will hopefully get reviewed ASAP :) Until then, you can check out my PR branch for the fix. |
The moment library is moving away from accepting constructors of the form
moment(timestamp)
. A time format must be passed. There are three lines of code that use the old syntax:https://github.com/mattbradley/livestampjs/blob/master/livestamp.js#L27
https://github.com/mattbradley/livestampjs/blob/master/livestamp.js#L30
https://github.com/mattbradley/livestampjs/blob/master/livestamp.js#L94
timestamp
is a string at that point in code, e.g.Tue Aug 05 2014 15:50:37 GMT-0700 (Pacific Daylight Time)"
, which seems brittle. Could it be the UNIX timetamp in seconds instead, or a Date object?The text was updated successfully, but these errors were encountered: