1 line
5.8 KiB
JSON
1 line
5.8 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\dateTime.js","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\dateTime.js","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.split\";\n\n// 中国标准时间format yyyy-mm-dd\nvar format = function format(time) {\n var ymd = '';\n var mouth = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : '0' + (time.getMonth() + 1);\n var day = time.getDate() >= 10 ? time.getDate() : '0' + time.getDate();\n ymd += time.getFullYear() + '-'; // 获取年份。\n\n ymd += mouth + '-'; // 获取月份。\n\n ymd += day; // 获取日。\n\n return ymd; // 返回日期。\n};\n\nexport var getAllDate = function getAllDate(start, end) {\n var dateArr = [];\n var startArr = start.split('-');\n var endArr = end.split('-');\n var db = new Date();\n db.setUTCFullYear(startArr[0], startArr[1] - 1, startArr[2]);\n var de = new Date();\n de.setUTCFullYear(endArr[0], endArr[1] - 1, endArr[2]);\n var unixDb = db.getTime();\n var unixDe = de.getTime();\n var stamp;\n var oneDay = 24 * 60 * 60 * 1000;\n\n for (stamp = unixDb; stamp <= unixDe;) {\n dateArr.push(format(new Date(parseInt(stamp))));\n stamp = stamp + oneDay;\n }\n\n return dateArr;\n};\nexport function getNowFormatDate(date) {\n var seperator1 = \"-\";\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var strDate = date.getDate();\n\n if (month >= 1 && month <= 9) {\n month = \"0\" + month;\n }\n\n if (strDate >= 0 && strDate <= 9) {\n strDate = \"0\" + strDate;\n }\n\n var currentdate = year + seperator1 + month + seperator1 + strDate;\n return currentdate;\n}",{"version":3,"sources":["C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\dateTime.js"],"names":["format","time","ymd","mouth","getMonth","day","getDate","getFullYear","getAllDate","start","end","dateArr","startArr","split","endArr","db","Date","setUTCFullYear","de","unixDb","getTime","unixDe","stamp","oneDay","push","parseInt","getNowFormatDate","date","seperator1","year","month","strDate","currentdate"],"mappings":";;AAAA;AACA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,IAAD,EAAU;AACxB,MAAIC,GAAG,GAAG,EAAV;AACA,MAAIC,KAAK,GAAIF,IAAI,CAACG,QAAL,KAAkB,CAAnB,IAAyB,EAAzB,GAA+BH,IAAI,CAACG,QAAL,KAAkB,CAAjD,GAAuD,OAAOH,IAAI,CAACG,QAAL,KAAkB,CAAzB,CAAnE;AACA,MAAIC,GAAG,GAAGJ,IAAI,CAACK,OAAL,MAAkB,EAAlB,GAAuBL,IAAI,CAACK,OAAL,EAAvB,GAAyC,MAAML,IAAI,CAACK,OAAL,EAAzD;AACAJ,EAAAA,GAAG,IAAID,IAAI,CAACM,WAAL,KAAqB,GAA5B,CAJwB,CAIQ;;AAChCL,EAAAA,GAAG,IAAIC,KAAK,GAAG,GAAf,CALwB,CAKL;;AACnBD,EAAAA,GAAG,IAAIG,GAAP,CANwB,CAMb;;AACX,SAAOH,GAAP,CAPwB,CAOb;AACX,CARD;;AAUA,OAAO,IAAMM,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAQC,GAAR,EAAgB;AACzC,MAAIC,OAAO,GAAG,EAAd;AACA,MAAIC,QAAQ,GAAGH,KAAK,CAACI,KAAN,CAAY,GAAZ,CAAf;AACA,MAAIC,MAAM,GAAGJ,GAAG,CAACG,KAAJ,CAAU,GAAV,CAAb;AACA,MAAIE,EAAE,GAAG,IAAIC,IAAJ,EAAT;AAC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AAMA,OAAhB;AACA;;AACD,MAAIC,WAAW,GAAGH,IAAI,GAAGD,UAAP,GAAoBE,KAApB,GAA4BF,UAA5B,GAAyCG,OAA3D;AACA,SAAOC,WAAP;AACA","sourcesContent":["// 中国标准时间format yyyy-mm-dd\nconst format = (time) => {\n\tlet ymd = ''\n\tlet mouth = (time.getMonth() + 1) >= 10 ? (time.getMonth() + 1) : ('0' + (time.getMonth() + 1))\n\tlet day = time.getDate() >= 10 ? time.getDate() : ('0' + time.getDate())\n\tymd += time.getFullYear() + '-' // 获取年份。\n\tymd += mouth + '-' // 获取月份。\n\tymd += day // 获取日。\n\treturn ymd // 返回日期。\n}\n\nexport const getAllDate = (start, end) => {\n\tlet dateArr = []\n\tlet startArr = start.split('-')\n\tlet endArr = end.split('-')\n\tlet db = new Date()\n\tdb.setUTCFullYear(startArr[0], startArr[1] - 1, startArr[2])\n\tlet de = new Date()\n\tde.setUTCFullYear(endArr[0], endArr[1] - 1, endArr[2])\n\tlet unixDb = db.getTime()\n\tlet unixDe = de.getTime()\n\tlet stamp\n\tconst oneDay = 24 * 60 * 60 * 1000;\n\tfor (stamp = unixDb; stamp <= unixDe;) {\n\t\tdateArr.push(format(new Date(parseInt(stamp))))\n\t\tstamp = stamp + oneDay\n\t}\n\treturn dateArr\n}\n\nexport function getNowFormatDate(date) {\n\tvar seperator1 = \"-\";\n\tvar year = date.getFullYear();\n\tvar month = date.getMonth() + 1;\n\tvar strDate = date.getDate();\n\tif (month >= 1 && month <= 9) {\n\t\tmonth = \"0\" + month;\n\t}\n\tif (strDate >= 0 && strDate <= 9) {\n\t\tstrDate = \"0\" + strDate;\n\t}\n\tvar currentdate = year + seperator1 + month + seperator1 + strDate;\n\treturn currentdate;\n}\n"]}]} |