Skip to content

Commit 2399d4b

Browse files
committed
fix(core): return type of formatDateTime() to string
1 parent d1e6ffd commit 2399d4b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/lib/date.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ function pad(num: number, length: number): string {
3232
}
3333

3434

35-
36-
3735
export const defaultDateTimeFormatOptions: Intl.DateTimeFormatOptions = {
3836
year: 'numeric',
3937
month: '2-digit',
@@ -52,7 +50,7 @@ export function formatDateTime(
5250
input: number | string | Date,
5351
locales: string | string[] = 'zh-CN',
5452
options?: Intl.DateTimeFormatOptions,
55-
): any {
53+
): string {
5654

5755
const dateFormatter = locales && options
5856
? new Intl.DateTimeFormat(locales, options)

0 commit comments

Comments
 (0)