@nocobase/utils 1.6.0-beta.9 → 1.7.0-beta.1
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/lib/date.js +3 -3
- package/package.json +2 -2
package/lib/date.js
CHANGED
|
@@ -99,19 +99,19 @@ const toMoment = /* @__PURE__ */ __name((val, options) => {
|
|
|
99
99
|
if (!val) {
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
const offset = options.utcOffset
|
|
102
|
+
const offset = options.utcOffset;
|
|
103
103
|
const { gmt, picker, utc = true } = options;
|
|
104
104
|
if ((0, import_dayjs.dayjs)(val).isValid()) {
|
|
105
105
|
if (!utc) {
|
|
106
106
|
return (0, import_dayjs.dayjs)(val);
|
|
107
107
|
}
|
|
108
108
|
if (import_dayjs.dayjs.isDayjs(val)) {
|
|
109
|
-
return val.utcOffset(offsetFromString(offset));
|
|
109
|
+
return offset ? val.utcOffset(offsetFromString(offset)) : val;
|
|
110
110
|
}
|
|
111
111
|
if (gmt) {
|
|
112
112
|
return (0, import_dayjs.dayjs)(val).utcOffset(0);
|
|
113
113
|
}
|
|
114
|
-
return (0, import_dayjs.dayjs)(val).utcOffset(offsetFromString(offset));
|
|
114
|
+
return offset ? (0, import_dayjs.dayjs)(val).utcOffset(offsetFromString(offset)) : (0, import_dayjs.dayjs)(val);
|
|
115
115
|
} else {
|
|
116
116
|
return convertQuarterToFirstDay(val);
|
|
117
117
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-beta.1",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"multer": "^1.4.5-lts.1",
|
|
17
17
|
"object-path": "^0.11.8"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "374a1bc60b3d55fd8b532a57c8fe0423eed1d11e"
|
|
20
20
|
}
|