import differenceInCalendarWeeks from '../differenceInCalendarWeeks/index' ; import lastDayOfMonth from '../lastDayOfMonth/index' ; import startOfMonth from '../startOfMonth/index' ; import requiredArgs from '../_lib/requiredArgs/index' ; import type { LocaleOptions , WeekStartOptions } from '../types' ; name category summary description param { Date | Number } date param options param { Locale } options . locale - the locale object. See [Locale] https param { 0 | 1 | 2 | 3 | 4 | 5 | 6 } options . weekStartsOn returns { Number } throws throws example example export default function getWeeksInMonth ( date , options ? ) { requiredArgs ( 1 , arguments ) ; return ( differenceInCalendarWeeks ( lastDayOfMonth ( date ) , startOfMonth ( date ) , options ) + 1 ) ; }