Answers for "check today's date in javascript"

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
1

get today's date in js

let today = new Date().toISOString().slice(0, 10)

console.log(today)
Posted by: Guest on March-19-2021
0

get today's date in js

var utc = new Date().toJSON().slice(0,10).replace(/-/g,'/');
document.write(utc);
Posted by: Guest on March-19-2021

Code answers related to "check today's date in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language