check if date is less than today moment code example
Example: check if date is less than today moment
let diff = moment().diff(new Date('DATE_HERE'))
if(div >= 0) {
//Current date or past date
}
else {
//Future date
}
let diff = moment().diff(new Date('DATE_HERE'))
if(div >= 0) {
//Current date or past date
}
else {
//Future date
}