UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

24 lines (18 loc) 493 B
'use strict'; /*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ // src/isSameDay.ts function isSameDay(date1, date2) { if (!(date1 && date2)) { return false; } return date1.getDate() === date2.getDate() && date1.getMonth() === date2.getMonth() && date1.getFullYear() === date2.getFullYear(); } // src/isToday.ts function isToday(date) { return isSameDay(date, /* @__PURE__ */ new Date()); } exports.isToday = isToday;