cosey 0.3.21 → 0.3.22
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/package.json +1 -1
- package/utils/date.d.ts +2 -2
- package/utils/date.js +4 -4
package/package.json
CHANGED
package/utils/date.d.ts
CHANGED
|
@@ -11,11 +11,11 @@ export declare function getDayjs(date?: Parameters<typeof dayjs>[0]): dayjs.Dayj
|
|
|
11
11
|
/**
|
|
12
12
|
* 格式化为“年月日 时分秒”
|
|
13
13
|
*/
|
|
14
|
-
export declare function formatAsDateTime(date?: Parameters<typeof dayjs>[0]
|
|
14
|
+
export declare function formatAsDateTime(date?: Parameters<typeof dayjs>[0]): string;
|
|
15
15
|
/**
|
|
16
16
|
* 格式化为“年月日”
|
|
17
17
|
*/
|
|
18
|
-
export declare function formatAsDate(date?: Parameters<typeof dayjs>[0]
|
|
18
|
+
export declare function formatAsDate(date?: Parameters<typeof dayjs>[0]): string;
|
|
19
19
|
/**
|
|
20
20
|
* 格式化为基础格式的日期+时间,即未添加分隔符的格式
|
|
21
21
|
*/
|
package/utils/date.js
CHANGED
|
@@ -11,11 +11,11 @@ function getDayjs(date) {
|
|
|
11
11
|
}
|
|
12
12
|
return dayjs(date);
|
|
13
13
|
}
|
|
14
|
-
function formatAsDateTime(date
|
|
15
|
-
return getDayjs(date).format(
|
|
14
|
+
function formatAsDateTime(date) {
|
|
15
|
+
return getDayjs(date).format(DATE_TIME_FORMAT);
|
|
16
16
|
}
|
|
17
|
-
function formatAsDate(date
|
|
18
|
-
return getDayjs(date).format(
|
|
17
|
+
function formatAsDate(date) {
|
|
18
|
+
return getDayjs(date).format(DATE_FORMAT);
|
|
19
19
|
}
|
|
20
20
|
function formatAsBasicDateTime(date) {
|
|
21
21
|
return getDayjs(date).format("YYYYMMDDHHmmss");
|