JSFiddle - React, Tailwind, and code Playground
by harifrais
JavaScript
var now = "2019/04/29 12:40:27";
var then = "2019/04/29 12:40:56";
var ms = moment(now,"DD/MM/YYYY HH:mm:ss").diff(moment(then,"DD/MM/YYYY HH:mm:ss"));
var d = moment.duration(ms);
console.log(d.days(), d.hours(), d.minutes(), d.seconds());