( date: DateValue, locale: string, firstDayOfWeek?: DayOfWeek )
| 338 | |
| 339 | /** Returns the number of weeks in the given month and locale. */ |
| 340 | export function getWeeksInMonth( |
| 341 | date: DateValue, |
| 342 | locale: string, |
| 343 | firstDayOfWeek?: DayOfWeek |
| 344 | ): number { |
| 345 | let days = date.calendar.getDaysInMonth(date); |
| 346 | return Math.ceil((getDayOfWeek(startOfMonth(date), locale, firstDayOfWeek) + days) / 7); |
| 347 | } |
| 348 | |
| 349 | /** Returns the lesser of the two provider dates. */ |
| 350 | export function minDate<A extends DateValue, B extends DateValue>(a: A, b: B): A | B; |
no test coverage detected