I'm Using momentjs to find the time until a date.
moment(end).locale('nl').fromNow('s')
Currently using this, only this this returns 1 day
I'm looking for something like 86400
Is this possible with momentjs?
I'm Using momentjs to find the time until a date.
moment(end).locale('nl').fromNow('s')
Currently using this, only this this returns 1 day
I'm looking for something like 86400
Is this possible with momentjs?
I manage to fix it using the following line of code
moment().diff(end, "seconds")
Note: this will give a negative time
as of October 2018 , you can also do this :
const date = '20181031'
const time = '16:25:26'
console.log(moment().diff('2018/10/31 18:14:00')) // time difference in milliseconds