0b54831f483e56a778af80a99ccbbfcc53441046b8d1486edbd07c9fe1e245ba.json 2.4 KB

1
  1. {"ast":null,"code":"/**\n * @name endOfYesterday\n * @category Day Helpers\n * @summary Return the end of yesterday.\n * @pure false\n *\n * @description\n * Return the end of yesterday.\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `new Date()` internally hence impure and can't be safely curried.\n *\n * @returns {Date} the end of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * const result = endOfYesterday()\n * //=> Sun Oct 5 2014 23:59:59.999\n */\nexport default function endOfYesterday() {\n var now = new Date();\n var year = now.getFullYear();\n var month = now.getMonth();\n var day = now.getDate();\n var date = new Date(0);\n date.setFullYear(year, month, day - 1);\n date.setHours(23, 59, 59, 999);\n return date;\n}","map":{"version":3,"names":["endOfYesterday","now","Date","year","getFullYear","month","getMonth","day","getDate","date","setFullYear","setHours"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/date-fns/esm/endOfYesterday/index.js"],"sourcesContent":["/**\n * @name endOfYesterday\n * @category Day Helpers\n * @summary Return the end of yesterday.\n * @pure false\n *\n * @description\n * Return the end of yesterday.\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `new Date()` internally hence impure and can't be safely curried.\n *\n * @returns {Date} the end of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * const result = endOfYesterday()\n * //=> Sun Oct 5 2014 23:59:59.999\n */\nexport default function endOfYesterday() {\n var now = new Date();\n var year = now.getFullYear();\n var month = now.getMonth();\n var day = now.getDate();\n var date = new Date(0);\n date.setFullYear(year, month, day - 1);\n date.setHours(23, 59, 59, 999);\n return date;\n}"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,cAAcA,CAAA,EAAG;EACvC,IAAIC,GAAG,GAAG,IAAIC,IAAI,CAAC,CAAC;EACpB,IAAIC,IAAI,GAAGF,GAAG,CAACG,WAAW,CAAC,CAAC;EAC5B,IAAIC,KAAK,GAAGJ,GAAG,CAACK,QAAQ,CAAC,CAAC;EAC1B,IAAIC,GAAG,GAAGN,GAAG,CAACO,OAAO,CAAC,CAAC;EACvB,IAAIC,IAAI,GAAG,IAAIP,IAAI,CAAC,CAAC,CAAC;EACtBO,IAAI,CAACC,WAAW,CAACP,IAAI,EAAEE,KAAK,EAAEE,GAAG,GAAG,CAAC,CAAC;EACtCE,IAAI,CAACE,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;EAC9B,OAAOF,IAAI;AACb","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}