moment how to diff two dates code example
Example 1: moment diff
const dateDifference = moment(date1).diff(moment(date2))
Example 2: moment date difference in days
moment(new Date()).diff(moment(new Date()), 'days') // 0
const dateDifference = moment(date1).diff(moment(date2))
moment(new Date()).diff(moment(new Date()), 'days') // 0