You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Wed, 04 Apr 2012 21:09:16 GMT to = moment.utc().add('m', 60).toDate(); seconds = moment.diff(to, 'seconds');
I'm trying to get the seconds from the current time in UTC and another date that is set in UTC.
I'm using moment.diff- the above code returns a negative value of -3600 instead of 3600.
Is this the correct way to do this? Shouldn't the negative only be if the date has passed?
The text was updated successfully, but these errors were encountered:
//Wed, 04 Apr 2012 21:09:16 GMT to = moment.utc().add('m', 60).toDate(); seconds = moment.diff(to, 'seconds');
I'm trying to get the seconds from the current time in UTC and another date that is set in UTC.
I'm using
moment.diff
- the above code returns a negative value of -3600 instead of 3600.Is this the correct way to do this? Shouldn't the negative only be if the date has passed?
The text was updated successfully, but these errors were encountered: