evyos-frontend-development/frontend/lib/utils.ts

12 lines
429 B
TypeScript

import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
export function dateToLocaleString(date: string) {
return new Date(date).toLocaleString("en-US",
{ timeZone: "Europe/Istanbul", hour12: false, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }
);
}