1 |
- {"ast":null,"code":"import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}","map":{"version":3,"names":["toInteger","toDate","requiredArgs","setDate","dirtyDate","dirtyDayOfMonth","arguments","date","dayOfMonth"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/date-fns/esm/setDate/index.js"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}"],"mappings":"AAAA,OAAOA,SAAS,MAAM,4BAA4B;AAClD,OAAOC,MAAM,MAAM,oBAAoB;AACvC,OAAOC,YAAY,MAAM,+BAA+B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,OAAOA,CAACC,SAAS,EAAEC,eAAe,EAAE;EAC1DH,YAAY,CAAC,CAAC,EAAEI,SAAS,CAAC;EAC1B,IAAIC,IAAI,GAAGN,MAAM,CAACG,SAAS,CAAC;EAC5B,IAAII,UAAU,GAAGR,SAAS,CAACK,eAAe,CAAC;EAC3CE,IAAI,CAACJ,OAAO,CAACK,UAAU,CAAC;EACxB,OAAOD,IAAI;AACb","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|