user management ui

This commit is contained in:
yaschalew
2026-07-10 10:41:48 +03:00
parent dcb2d98503
commit 28a20923ff
595 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import { formatDistanceToNow, parseISO } from "date-fns";
export const getRelativeTime = (isoDate: string): string => {
return formatDistanceToNow(parseISO(isoDate), { addSuffix: true });
};

View File

@@ -0,0 +1,28 @@
import { ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
export function formatDate(input: string | number | Date): string {
const date = new Date(input);
return date.toLocaleDateString("en-US", {
month: "long",
day: "numeric",
year: "numeric",
});
}
export function formatDateTime(input: string | number | Date): string {
const date = new Date(input);
return date.toLocaleDateString("en-US", {
month: "long",
day: "numeric",
year: "numeric",
hour: "numeric",
minute: "numeric",
});
}
// Add any other utility functions here that might be needed