@base-web-kits/base-tools-ts 1.3.8 → 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.
- package/README.md +23 -37
- package/dist/base-tools-ts.umd.global.js +5 -0
- package/dist/base-tools-ts.umd.global.js.map +1 -1
- package/dist/day/index.d.ts +11 -0
- package/dist/day/index.d.ts.map +1 -1
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -1
- package/dist/url/oss/index.d.ts +8 -10
- package/dist/url/oss/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ts/day/index.ts +15 -0
- package/src/ts/url/oss/index.ts +9 -11
package/dist/index.mjs
CHANGED
|
@@ -3054,6 +3054,10 @@ function toDayjs(t, fmt) {
|
|
|
3054
3054
|
}
|
|
3055
3055
|
return dayjs(t, fmt);
|
|
3056
3056
|
}
|
|
3057
|
+
function dateFormat(t, fmt = "YYYY-MM-DD HH:mm:ss") {
|
|
3058
|
+
if (!t) return "";
|
|
3059
|
+
return toDayjs(t).format(fmt);
|
|
3060
|
+
}
|
|
3057
3061
|
function getDateRangeBefore(offset, fmt = "YYYY-MM-DD") {
|
|
3058
3062
|
const now = toDayjs(Date.now());
|
|
3059
3063
|
const n = Math.max(0, Math.trunc(offset));
|
|
@@ -3965,6 +3969,7 @@ export {
|
|
|
3965
3969
|
createViewRandId,
|
|
3966
3970
|
curry,
|
|
3967
3971
|
curryRight,
|
|
3972
|
+
dateFormat,
|
|
3968
3973
|
dayjs,
|
|
3969
3974
|
debounce,
|
|
3970
3975
|
deburr,
|