3
How to get current date with time in js?
I need to know how many days you ran after a certain date. I’m using momentjs
var start = moment( "2016/06/17" );
var end = moment( new Date() );
var time = date_start.to(date_end);
console.log( moment.duration(time, 'days').humanize());
My problem is that for the same day, I need the time difference of the date. Only the time is reset, so the difference is equal to zero.
It worked perfectly. Thank you!!
– Thiago R.