Files
tekelanew_acs/acs/nladmin-ui/node_modules/.cache/babel-loader/bf9a5d5db58ff4e10949b79e47ea8805.json
2024-12-05 09:33:18 +08:00

1 line
6.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\eslint-loader\\index.js??ref--13-0!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\utils\\datetime.js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\utils\\datetime.js","mtime":1732871026552},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\babel.config.js","mtime":1732871025888},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\eslint-loader\\index.js","mtime":1732872823677}],"contextDependencies":[],"result":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nrequire(\"core-js/modules/es6.string.repeat\");\nrequire(\"core-js/modules/es6.regexp.to-string\");\nrequire(\"core-js/modules/es6.string.starts-with\");\nrequire(\"core-js/modules/es6.regexp.replace\");\n/* eslint-disable */\n\n/**\r\n * Date对象的补充函数包括类似Python中的strftime()\r\n * 阿债 https://gitee.com/azhai/datetime.js\r\n */\n\nDate.prototype.toMidnight = function () {\n this.setHours(0);\n this.setMinutes(0);\n this.setSeconds(0);\n this.setMilliseconds(0);\n return this;\n};\nDate.prototype.daysAgo = function (days, midnight) {\n days = days ? days - 0 : 0;\n var date = new Date(this.getTime() - days * 8.64E7);\n return midnight ? date.toMidnight() : date;\n};\nDate.prototype.monthBegin = function (offset) {\n offset = offset ? offset - 0 : 0;\n var days = this.getDate() - 1 - offset;\n return this.daysAgo(days, true);\n};\nDate.prototype.quarterBegin = function () {\n var month = this.getMonth() - this.getMonth() % 3;\n return new Date(this.getFullYear(), month, 1).toMidnight();\n};\nDate.prototype.yearBegin = function () {\n return new Date(this.getFullYear(), 0, 1).toMidnight();\n};\nDate.prototype.strftime = function (format, local) {\n if (!format) {\n var str = new Date(this.getTime() + 2.88E7).toISOString();\n return str.substr(0, 16).replace('T', ' ');\n }\n local = local && local.startsWith('zh') ? 'zh' : 'en';\n var padZero = function padZero(str, len) {\n var pads = len - str.toString().length;\n return (pads && pads > 0 ? '0'.repeat(pads) : '') + str;\n };\n format = format.replace('%F', '%Y-%m-%d');\n format = format.replace(/%D|%x/, '%m/%d/%y');\n format = format.replace(/%T|%X/, '%H:%M:%S');\n format = format.replace('%R', '%H:%M');\n format = format.replace('%r', '%H:%M:%S %p');\n format = format.replace('%c', '%a %b %e %H:%M:%S %Y');\n var _this = this;\n return format.replace(/%[A-Za-z%]/g, function (f) {\n var ans = f;\n switch (f) {\n case '%%':\n ans = '%';\n break;\n case '%Y':\n case '%G':\n ans = _this.getFullYear();\n break;\n case '%y':\n ans = _this.getFullYear() % 100;\n break;\n case '%C':\n ans = _this.getFullYear() / 100;\n break;\n case '%m':\n case '%n':\n ans = _this.getMonth() + 1;\n break;\n case '%B':\n local = local.startsWith('en') ? 'english' : local;\n case '%b':\n var m = _this.getMonth();\n ans = local_labels.monthes[local][m];\n break;\n case '%d':\n case '%e':\n ans = _this.getDate();\n break;\n case '%j':\n ans = _this.getDaysOfYear();\n break;\n case '%U':\n case '%W':\n var ws = _this.getWeeksOfYear(f === '%W');\n ans = padZero(ws, 2);\n break;\n case '%w':\n ans = _this.getDay();\n case '%u':\n ans = ans === 0 ? 7 : ans;\n break;\n case '%A':\n local = local.startsWith('en') ? 'english' : local;\n case '%a':\n var d = _this.getDay();\n ans = local_labels.weekdays[local][d];\n break;\n case '%H':\n case '%k':\n ans = _this.getHours();\n break;\n case '%I':\n case '%l':\n ans = _this.getHours();\n ans = ans % 12;\n break;\n case '%M':\n ans = _this.getMinutes();\n break;\n case '%S':\n ans = _this.getSeconds();\n break;\n case '%s':\n ans = parseInt(_this.getTime() / 1E3);\n break;\n case '%f':\n var ms = _this.getMilliseconds();\n ans = padZero(ms * 1E3, 6);\n break;\n case '%P':\n local = local.startsWith('en') ? 'english' : local;\n case '%p':\n var h = _this.getHours();\n ans = local_labels.meridians[local][h < 12 ? 0 : 1];\n break;\n case '%z':\n var tzo = _this.getTimezoneOffset();\n var sign = tzo < 0 ? '-' : '+';\n tzo = Math.abs(tzo);\n var ho = padZero(tzo / 60, 2);\n var mo = padZero(tzo % 60, 2);\n ans = sign + ho + mo;\n break;\n default:\n break;\n }\n if (f === '%C' || f === '%y' || f === '%m' || f === '%d' || f === '%H' || f === '%M' || f === '%S') {\n ans = padZero(ans, 2);\n }\n return ans.toString();\n });\n};\nDate.prototype.humanize = function (local) {\n local = local && local.startsWith('zh') ? 'zh' : 'en';\n var result = this.strftime('', local);\n var days = (Date.today() - this.toMidnight().getTime()) / 8.64E7;\n if (days <= -10 || days >= 10) {\n return result;\n }\n var labels = local_labels.dayagos[local];\n var lbl = '';\n if (days === 0 || days === 1) {\n lbl = labels[days];\n } else if (days === -1) {\n lbl = labels[2];\n } else if (days >= 2) {\n lbl = days + labels[3];\n } else {\n lbl = days + labels[4];\n }\n return lbl + result.substr(10, 6);\n};\nvar local_labels = {\n monthes: {\n english: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n en: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n zh: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']\n },\n weekdays: {\n english: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n en: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n zh: ['日', '一', '二', '三', '四', '五', '六']\n },\n meridians: {\n english: ['a.m.', 'p.m.'],\n en: ['AM', 'PM'],\n zh: ['上午', '下午']\n },\n dayagos: {\n english: ['Today', 'Yesterday', 'Tomorrow', ' days ago', ' days late'],\n en: ['Today', 'Yesterday', 'Tomorrow', ' days ago', ' days late'],\n zh: ['今天', '昨天', '明天', '天前', '天后']\n }\n};\nvar _default = exports.default = Date;",null]}