(date: CalendarDate)
| 1 | import CalendarDate from "./CalendarDate.js"; |
| 2 | |
| 3 | const getDaysInMonth = (date: CalendarDate) => { |
| 4 | const tempCalendarDate = new CalendarDate(date); |
| 5 | tempCalendarDate.setDate(1); |
| 6 | tempCalendarDate.setMonth(tempCalendarDate.getMonth() + 1); |
| 7 | tempCalendarDate.setDate(0); |
| 8 | return tempCalendarDate.getDate(); |
| 9 | }; |
| 10 | |
| 11 | export default getDaysInMonth; |
no test coverage detected
searching dependent graphs…