startOfMonth
Commons
stable
Return a new Date set to the first day of the same month (day 1, time 00:00:00). The original date is not mutated.
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 reference date. Year and month are preserved; day is forced to 1 and time fields are cleared.
API
Valeur de retour
La valeur retournée par cet util.
- A new Date at the first day of the month, time 00:00:00.
Usage
Exemples
Extraits de code prêts à coller.
Get the first day of the current month