diff --git a/snippets/getMonthDays.md b/snippets/getMonthDays.md index f96b81b86..fdc3e0148 100644 --- a/snippets/getMonthDays.md +++ b/snippets/getMonthDays.md @@ -5,7 +5,7 @@ tags: date,intermediate Get the number of days in the month according to the specified month. -- Use `new Date(year, monthIndex, day)`, set the parameter day to `0` to get last day of the month. +- Use `new Date(year, monthIndex, day)`, set the parameter day to `0` to get last day of the previous month. - Use `Date.prototype.getDate` to get the day of month. ```js