mirror of
https://github.com/open-gitagent/langship.sh.git
synced 2026-08-03 07:21:04 +02:00
13 lines
364 B
TypeScript
13 lines
364 B
TypeScript
import { clsx, type ClassValue } from "clsx";
|
|
import { twMerge } from "tailwind-merge";
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|
|
|
|
export function formatDate(value: string | Date) {
|
|
const d = typeof value === "string" ? new Date(value) : value;
|
|
if (Number.isNaN(d.getTime())) return "—";
|
|
return d.toLocaleString();
|
|
}
|