isToday
Calendar
stable
Returns true when a Date object falls on the current calendar day in local timezone. Captures the "now" reference at call time (no memoization) to keep the function pure across calls.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- daterequisDate
- The date to compare against today. The comparison is delegated to isSameDay(date, new Date()).
API
Valeur de retour
La valeur retournée par cet util.
- true when the date shares the same local calendar day as the current moment; false otherwise.
Usage
Exemples
Extraits de code prêts à coller.
Highlighting today in a calendar cell