I need a subtraction between dates:
new Date() - new Date();
Or to do that with string dates:
finishTime: "2019-10-29T01:30:35.423"
startTime: "2019-10-23T09:17:17.423"
How to do that properly in JS?
I have tried this:
const s = new Date(item.finishTime).getDate();
const f = new Date(item.startTime).getDate();
const d = new Date(f - s);
It gives me difference: Thu Jan 01 1970 03:59:59 GMT+0400 Standard Time)