{"version":3,"sources":["../src/diffWeeks.ts"],"sourcesContent":["import { diffMilliseconds } from \"./diffMilliseconds\"\nimport { DateInput, MaybeDateInput } from \"./types\"\nimport { diffRound, type DiffRoundingMethod } from \"./diffRound\"\n\n/**\n * Returns the difference between 2 dates in days.\n * @param dateA - A date to compare with the right date\n * @param [dateB] - A date to compare with the left date or nothing to compare with the current time\n * @param [roundingMethod] - the rounding method to use, default: trunc\n */\nexport function diffWeeks(\n  dateA: DateInput,\n  dateB: DateInput,\n  roundingMethod?: DiffRoundingMethod\n): number\n\n/**\n * Returns the difference between 2 dates in days.\n * @param [dateA] - A date to compare with the right date or null to compare with the current time\n * @param dateB - A date to compare with the left date\n * @param [roundingMethod] - the rounding method to use, default: trunc\n */\nexport function diffWeeks(\n  dateA: DateInput,\n  dateB: DateInput,\n  roundingMethod?: DiffRoundingMethod\n): number\n\nexport function diffWeeks(\n  dateA: MaybeDateInput,\n  dateB: DateInput,\n  roundingMethod?: DiffRoundingMethod\n): number {\n  return diffRound(\n    diffMilliseconds(dateA, dateB) / 604800000, // day * 7\n    roundingMethod\n  )\n}\n"],"mappings":";AAAA,SAAS,wBAAwB;AAEjC,SAAS,iBAA0C;AA0B5C,SAAS,UACd,OACA,OACA,gBACQ;AACR,SAAO;AAAA,IACL,iBAAiB,OAAO,KAAK,IAAI;AAAA;AAAA,IACjC;AAAA,EACF;AACF;","names":[]}