@base-web-kits/base-tools-ts 1.3.10 → 1.3.11

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.
@@ -778,6 +778,7 @@ var baseToolsTS = (() => {
778
778
  createViewRandId: () => createViewRandId,
779
779
  curry: () => curry,
780
780
  curryRight: () => curryRight,
781
+ dateFormat: () => dateFormat,
781
782
  dayjs: () => import_dayjs.default,
782
783
  debounce: () => debounce,
783
784
  deburr: () => deburr,
@@ -5388,6 +5389,10 @@ var baseToolsTS = (() => {
5388
5389
  }
5389
5390
  return (0, import_dayjs.default)(t, fmt);
5390
5391
  }
5392
+ function dateFormat(t, fmt = "YYYY-MM-DD HH:mm:ss") {
5393
+ if (!t) return "";
5394
+ return toDayjs(t).format(fmt);
5395
+ }
5391
5396
  function getDateRangeBefore(offset, fmt = "YYYY-MM-DD") {
5392
5397
  const now = toDayjs(Date.now());
5393
5398
  const n = Math.max(0, Math.trunc(offset));