@semi-kit/utils 1.4.7 → 1.4.9
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/datetime.d.mts +4 -4
- package/package.json +1 -1
package/lib/datetime.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ interface FormatDateRangeParamsType {
|
|
|
11
11
|
* getDayOfYear(new Date('2024-01-01')) -> 1
|
|
12
12
|
* getDayOfYear(new Date('2024-12-31')) -> 366
|
|
13
13
|
*/
|
|
14
|
-
declare const getDayOfYear: (date?: ConfigType) =>
|
|
14
|
+
declare const getDayOfYear: (date?: ConfigType) => any;
|
|
15
15
|
/**
|
|
16
16
|
* 判断给定日期是否是工作日
|
|
17
17
|
* @param date - 日期对象或可转换为日期的值
|
|
@@ -30,7 +30,7 @@ declare const isWeekday: (date?: ConfigType) => boolean;
|
|
|
30
30
|
* useFormatTime(new Date()) -> '14:25:59'
|
|
31
31
|
* useFormatTime(1638345600000, 'HH:mm') -> '14:25'
|
|
32
32
|
*/
|
|
33
|
-
declare const useFormatTime: (time?: ConfigType, type?: string) =>
|
|
33
|
+
declare const useFormatTime: (time?: ConfigType, type?: string) => any;
|
|
34
34
|
/**
|
|
35
35
|
* 时间转换为标准日期格式
|
|
36
36
|
* @param time - 时间戳或日期对象, 默认为当前时间
|
|
@@ -40,7 +40,7 @@ declare const useFormatTime: (time?: ConfigType, type?: string) => string;
|
|
|
40
40
|
* useFormatDate(new Date()) -> '2022-11-09'
|
|
41
41
|
* useFormatDate(1638345600000, 'YYYY/MM/DD') -> '2021/12/01'
|
|
42
42
|
*/
|
|
43
|
-
declare const useFormatDate: (time?: ConfigType, type?: string) =>
|
|
43
|
+
declare const useFormatDate: (time?: ConfigType, type?: string) => any;
|
|
44
44
|
/**
|
|
45
45
|
* 将日期时间范围转换为请求参数格式
|
|
46
46
|
* @param timestamp - 时间范围数组 [开始时间, 结束时间]
|
|
@@ -69,5 +69,5 @@ declare const useFormatDateTimeParams: (timestamp: string[] | null | undefined,
|
|
|
69
69
|
declare const useFormatDateRange: (day?: number, {
|
|
70
70
|
endTimeType,
|
|
71
71
|
format
|
|
72
|
-
}?: FormatDateRangeParamsType) =>
|
|
72
|
+
}?: FormatDateRangeParamsType) => any[];
|
|
73
73
|
export { FormatDateRangeParamsType, getDayOfYear, isWeekday, useFormatDate, useFormatDateRange, useFormatDateTimeParams, useFormatTime };
|