This commit is contained in:
natib21
2026-07-10 11:25:59 +00:00
parent 2696ca7498
commit e6e44e773b
1146 changed files with 200266 additions and 90527 deletions

View File

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

View File

@@ -1,28 +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
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