if dates are not Date object, or ISO string, or timestamp number
// returns in the user's locale language, the time that will pass, or passed from now for the given date
const firstDate = new Date()
setTimeout(() => {
const secondDate = new Date()
// will return false
JMap.Util.Date.isBefore(firstDate, secondDate)
// will return true (because also check the time)
JMap.Util.Date.isBefore(firstDate, secondDate, true)
}, 1000)
JMap.Util.Date.isBefore
Returns true if the first date is before the second date.