how to find the difference from date in the past to current time moment jsusing .tonow code example
Example 1: moment date difference in days
moment(new Date()).diff(moment(new Date()), 'days') // 0
Example 2: moment js difference between two dates
var admission = moment('{date1}', 'DD-MM-YYYY');
var discharge = moment('{date2}', 'DD-MM-YYYY');
discharge.diff(admission, 'days');