Checks if the passed date is today

PHOTO EMBED

Mon Apr 25 2022 12:51:43 GMT+0000 (Coordinated Universal Time)

Saved by @nimaSm #utils

const isToday = (date) => {
  const today = new Date();
  return (
    date.getDate() === today.getDate() &&
    date.getMonth() === today.getMonth() &&
    date.getFullYear() === today.getFullYear()
  );
};
content_copyCOPY