Skip to content

Commit 193804b

Browse files
committed
style: refine date format visual (dots to slashes)
1 parent 5a715c6 commit 193804b

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/lib/utils.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ import { twMerge } from 'tailwind-merge';
44
export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
55

66
export const formatDate = (date: Date) => {
7-
return date
8-
.toLocaleDateString('zh-CN', {
9-
year: 'numeric',
10-
month: '2-digit',
11-
day: '2-digit',
12-
})
13-
.replace(/\//g, '.');
7+
return date.toLocaleDateString('zh-CN', {
8+
year: 'numeric',
9+
month: '2-digit',
10+
day: '2-digit',
11+
});
1412
};

0 commit comments

Comments
 (0)