UNPKG

tdesign-vue

Version:
64 lines (59 loc) 2.15 kB
/** * tdesign v1.14.1 * (c) 2025 tdesign * @license MIT */ import { c as createCommonjsModule, a as commonjsGlobal } from './dep-05dc6583.js'; var advancedFormat = createCommonjsModule(function (module, exports) { !function (e, t) { "object" == 'object' && "undefined" != 'object' ? module.exports = t() : "function" == typeof undefined && undefined.amd ? undefined(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t(); }(commonjsGlobal, function () { "use strict"; return function (e, t) { var r = t.prototype, n = r.format; r.format = function (e) { var t = this, r = this.$locale(); if (!this.isValid()) return n.bind(this)(e); var s = this.$utils(), a = (e || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function (e) { switch (e) { case "Q": return Math.ceil((t.$M + 1) / 3); case "Do": return r.ordinal(t.$D); case "gggg": return t.weekYear(); case "GGGG": return t.isoWeekYear(); case "wo": return r.ordinal(t.week(), "W"); case "w": case "ww": return s.s(t.week(), "w" === e ? 1 : 2, "0"); case "W": case "WW": return s.s(t.isoWeek(), "W" === e ? 1 : 2, "0"); case "k": case "kk": return s.s(String(0 === t.$H ? 24 : t.$H), "k" === e ? 1 : 2, "0"); case "X": return Math.floor(t.$d.getTime() / 1e3); case "x": return t.$d.getTime(); case "z": return "[" + t.offsetName() + "]"; case "zzz": return "[" + t.offsetName("long") + "]"; default: return e; } }); return n.bind(this)(a); }; }; }); }); export { advancedFormat as a }; //# sourceMappingURL=dep-b8e25a7f.js.map