javascript check if date is today

JavaScript
// `date` is a Date object
const isToday = (date) => date.toISOString().slice(0, 10) === new Date().toISOString().slice(0, 10);
Source

Also in JavaScript: