{"ast":null,"code":"import { setMonth } from \"./setMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setQuarter\n * @category Quarter Helpers\n * @summary Set the year quarter to the given date.\n *\n * @description\n * Set the year quarter to the given date.\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 date to be changed\n * @param quarter - The quarter of the new date\n *\n * @returns The new date with the quarter set\n *\n * @example\n * // Set the 2nd quarter to 2 July 2014:\n * const result = setQuarter(new Date(2014, 6, 2), 2)\n * //=> Wed Apr 02 2014 00:00:00\n */\nexport function setQuarter(date, quarter) {\n  const _date = toDate(date);\n  const oldQuarter = Math.trunc(_date.getMonth() / 3) + 1;\n  const diff = quarter - oldQuarter;\n  return setMonth(_date, _date.getMonth() + diff * 3);\n}\n\n// Fallback for modularized imports:\nexport default setQuarter;","map":{"version":3,"names":["setMonth","toDate","setQuarter","date","quarter","_date","oldQuarter","Math","trunc","getMonth","diff"],"sources":["/root/rfcontavagas_hom/12.-Servidor-local-Docker/Front-Parking-Angular/node_modules/date-fns/setQuarter.mjs"],"sourcesContent":["import { setMonth } from \"./setMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name setQuarter\n * @category Quarter Helpers\n * @summary Set the year quarter to the given date.\n *\n * @description\n * Set the year quarter to the given date.\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 date to be changed\n * @param quarter - The quarter of the new date\n *\n * @returns The new date with the quarter set\n *\n * @example\n * // Set the 2nd quarter to 2 July 2014:\n * const result = setQuarter(new Date(2014, 6, 2), 2)\n * //=> Wed Apr 02 2014 00:00:00\n */\nexport function setQuarter(date, quarter) {\n  const _date = toDate(date);\n  const oldQuarter = Math.trunc(_date.getMonth() / 3) + 1;\n  const diff = quarter - oldQuarter;\n  return setMonth(_date, _date.getMonth() + diff * 3);\n}\n\n// Fallback for modularized imports:\nexport default setQuarter;\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,MAAM,QAAQ,cAAc;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACC,IAAI,EAAEC,OAAO,EAAE;EACxC,MAAMC,KAAK,GAAGJ,MAAM,CAACE,IAAI,CAAC;EAC1B,MAAMG,UAAU,GAAGC,IAAI,CAACC,KAAK,CAACH,KAAK,CAACI,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;EACvD,MAAMC,IAAI,GAAGN,OAAO,GAAGE,UAAU;EACjC,OAAON,QAAQ,CAACK,KAAK,EAAEA,KAAK,CAACI,QAAQ,CAAC,CAAC,GAAGC,IAAI,GAAG,CAAC,CAAC;AACrD;;AAEA;AACA,eAAeR,UAAU","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}