isValid
Commons
stable
Returns true when the given value can be coerced into a valid JavaScript Date (not NaN). Accepts any input type.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- daterequisany
- The value to test. Can be a Date object, a date string, a timestamp number, or any other value.
API
Valeur de retour
La valeur retournée par cet util.
- true when the value produces a valid Date (not NaN), false otherwise.
Usage
Exemples
Extraits de code prêts à coller.
Valid and invalid date inputs