Initial commit: PodcastYes — AI podcast platform

This commit is contained in:
Leon Serfaty
2026-06-07 03:58:32 -04:00
commit 155507f21a
151 changed files with 19826 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
/** Merge conditional class names and de-duplicate Tailwind utilities. */
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
/** Format a number of cents (e.g. 900) as a currency string ("$9"). */
export function formatPrice(cents: number, currency = "USD") {
const dollars = cents / 100;
return new Intl.NumberFormat("en-US", {
style: "currency",
currency,
maximumFractionDigits: dollars % 1 === 0 ? 0 : 2,
}).format(dollars);
}
/** The monthly usage bucket key, e.g. "2026-06". Pass a date for testability. */
export function periodKey(date: Date): string {
const y = date.getUTCFullYear();
const m = String(date.getUTCMonth() + 1).padStart(2, "0");
return `${y}-${m}`;
}