js get if date is today code example
Example 1: js check if date is today
const isToday = (someDate) => {
const today = new Date()
return someDate.getDate() == today.getDate() &&
someDate.getMonth() == today.getMonth() &&
someDate.getFullYear() == today.getFullYear()
}
Example 2: get today's date javascript
var today = new Date();