@base-web-kits/base-tools-web 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1301,41 +1301,6 @@ var baseToolsWeb = (() => {
1301
1301
  });
1302
1302
  }
1303
1303
 
1304
- // src/ts/day/index.ts
1305
- var import_dayjs = __toESM(require_dayjs_min(), 1);
1306
- var import_customParseFormat = __toESM(require_customParseFormat(), 1);
1307
- var import_utc = __toESM(require_utc(), 1);
1308
- var import_timezone = __toESM(require_timezone(), 1);
1309
- var import_relativeTime = __toESM(require_relativeTime(), 1);
1310
- var import_advancedFormat = __toESM(require_advancedFormat(), 1);
1311
- var import_zh_cn = __toESM(require_zh_cn(), 1);
1312
- import_dayjs.default.extend(import_customParseFormat.default);
1313
- import_dayjs.default.extend(import_utc.default);
1314
- import_dayjs.default.extend(import_timezone.default);
1315
- import_dayjs.default.extend(import_relativeTime.default);
1316
- import_dayjs.default.extend(import_advancedFormat.default);
1317
- import_dayjs.default.locale("zh-cn");
1318
- function toDayjs(t, fmt) {
1319
- if (t === null || t === void 0) return (0, import_dayjs.default)();
1320
- if (typeof t === "number") {
1321
- const s = String(Math.trunc(t));
1322
- return (0, import_dayjs.default)(s.length === 10 ? t * 1e3 : t, fmt);
1323
- }
1324
- if (typeof t === "string") {
1325
- const s = t.trim();
1326
- if (/^\d{10}$/.test(s)) return (0, import_dayjs.default)(Number(s) * 1e3, fmt);
1327
- if (/^\d{13}$/.test(s)) return (0, import_dayjs.default)(Number(s), fmt);
1328
- if (/^\d{4}-\d{2}-\d{2}$/.test(s)) return (0, import_dayjs.default)(s, fmt || "YYYY-MM-DD");
1329
- if (/^\d{4}\/\d{2}\/\d{2}$/.test(s)) return (0, import_dayjs.default)(s, fmt || "YYYY/MM/DD");
1330
- if (/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}$/.test(s))
1331
- return (0, import_dayjs.default)(s, fmt || "YYYY-MM-DD HH:mm:ss");
1332
- if (/^\d{4}\/\d{2}\/\d{2}\s+\d{2}:\d{2}:\d{2}$/.test(s))
1333
- return (0, import_dayjs.default)(s, fmt || "YYYY/MM/DD HH:mm:ss");
1334
- return (0, import_dayjs.default)(s, fmt);
1335
- }
1336
- return (0, import_dayjs.default)(t, fmt);
1337
- }
1338
-
1339
1304
  // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
1340
1305
  function isPrimitive(value) {
1341
1306
  return value == null || typeof value !== "object" && typeof value !== "function";
@@ -1568,6 +1533,41 @@ var baseToolsWeb = (() => {
1568
1533
  return key === "__proto__";
1569
1534
  }
1570
1535
 
1536
+ // src/ts/day/index.ts
1537
+ var import_dayjs = __toESM(require_dayjs_min(), 1);
1538
+ var import_customParseFormat = __toESM(require_customParseFormat(), 1);
1539
+ var import_utc = __toESM(require_utc(), 1);
1540
+ var import_timezone = __toESM(require_timezone(), 1);
1541
+ var import_relativeTime = __toESM(require_relativeTime(), 1);
1542
+ var import_advancedFormat = __toESM(require_advancedFormat(), 1);
1543
+ var import_zh_cn = __toESM(require_zh_cn(), 1);
1544
+ import_dayjs.default.extend(import_customParseFormat.default);
1545
+ import_dayjs.default.extend(import_utc.default);
1546
+ import_dayjs.default.extend(import_timezone.default);
1547
+ import_dayjs.default.extend(import_relativeTime.default);
1548
+ import_dayjs.default.extend(import_advancedFormat.default);
1549
+ import_dayjs.default.locale("zh-cn");
1550
+ function toDayjs(t, fmt) {
1551
+ if (t === null || t === void 0) return (0, import_dayjs.default)();
1552
+ if (typeof t === "number") {
1553
+ const s = String(Math.trunc(t));
1554
+ return (0, import_dayjs.default)(s.length === 10 ? t * 1e3 : t, fmt);
1555
+ }
1556
+ if (typeof t === "string") {
1557
+ const s = t.trim();
1558
+ if (/^\d{10}$/.test(s)) return (0, import_dayjs.default)(Number(s) * 1e3, fmt);
1559
+ if (/^\d{13}$/.test(s)) return (0, import_dayjs.default)(Number(s), fmt);
1560
+ if (/^\d{4}-\d{2}-\d{2}$/.test(s)) return (0, import_dayjs.default)(s, fmt || "YYYY-MM-DD");
1561
+ if (/^\d{4}\/\d{2}\/\d{2}$/.test(s)) return (0, import_dayjs.default)(s, fmt || "YYYY/MM/DD");
1562
+ if (/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}$/.test(s))
1563
+ return (0, import_dayjs.default)(s, fmt || "YYYY-MM-DD HH:mm:ss");
1564
+ if (/^\d{4}\/\d{2}\/\d{2}\s+\d{2}:\d{2}:\d{2}$/.test(s))
1565
+ return (0, import_dayjs.default)(s, fmt || "YYYY/MM/DD HH:mm:ss");
1566
+ return (0, import_dayjs.default)(s, fmt);
1567
+ }
1568
+ return (0, import_dayjs.default)(t, fmt);
1569
+ }
1570
+
1571
1571
  // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
1572
1572
  function isDeepKey(key) {
1573
1573
  switch (typeof key) {