{"ast":null,"code":"import { differenceInCalendarWeeks } from \"./differenceInCalendarWeeks.mjs\";\nimport { lastDayOfMonth } from \"./lastDayOfMonth.mjs\";\nimport { startOfMonth } from \"./startOfMonth.mjs\";\n\n/**\n * The {@link getWeeksInMonth} function options.\n */\n\n/**\n * @name getWeeksInMonth\n * @category Week Helpers\n * @summary Get the number of calendar weeks a month spans.\n *\n * @description\n * Get the number of calendar weeks the month in the given date spans.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The number of calendar weeks\n *\n * @example\n * // How many calendar weeks does February 2015 span?\n * const result = getWeeksInMonth(new Date(2015, 1, 8))\n * //=> 4\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks does July 2017 span?\n * const result = getWeeksInMonth(new Date(2017, 6, 5), { weekStartsOn: 1 })\n * //=> 6\n */\nexport function getWeeksInMonth(date, options) {\n  return differenceInCalendarWeeks(lastDayOfMonth(date), startOfMonth(date), options) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeeksInMonth;","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}