isSameMonth
Commons
stable
Returns true when two Date objects fall in the same calendar month and year. Used in date pickers to determine which cells belong to the current month view.
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 first date to compare.
- comparingrequisDate
- The second date to compare against. Both month index and full year must match.
API
Valeur de retour
La valeur retournée par cet util.
- true when the month index and year are identical for both dates; false when either differs.
Usage
Exemples
Extraits de code prêts à coller.
Comparing dates for same-month equality