Answers for "js date is today"

17

return current date in javascript

let today = new Date().toLocaleDateString()

console.log(today)
Posted by: Guest on March-01-2020
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()
}
Posted by: Guest on January-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language