We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb971b8 commit caf6683Copy full SHA for caf6683
.gitignore
@@ -14,7 +14,6 @@ dist/
14
downloads/
15
eggs/
16
.eggs/
17
-lib/
18
lib64/
19
parts/
20
sdist/
web/src/lib/utils.ts
@@ -0,0 +1,16 @@
1
+import { type ClassValue, clsx } from "clsx"
2
+import { twMerge } from "tailwind-merge"
3
+
4
+export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+}
7
8
+export function formatDate(date: Date | string) {
9
+ return new Intl.DateTimeFormat('zh-CN', {
10
+ year: 'numeric',
11
+ month: '2-digit',
12
+ day: '2-digit',
13
+ hour: '2-digit',
+ minute: '2-digit',
+ }).format(new Date(date))
0 commit comments