first commit

This commit is contained in:
Dhananjaya99
2026-09-28 11:48:14 +05:30
commit a1b870fa8a
242 changed files with 39483 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
const DISPLAY_LOCALE = "en-LK"
const DISPLAY_TIME_ZONE = "Asia/Colombo"
/** Formatting is explicit so SSR and browser renders produce the same output. */
export function formatCurrency(amount: number) {
return `Rs. ${amount.toLocaleString(DISPLAY_LOCALE)}`
}
export function formatTime(iso: string) {
return new Date(iso).toLocaleTimeString(DISPLAY_LOCALE, {
hour: "numeric",
minute: "2-digit",
timeZone: DISPLAY_TIME_ZONE,
})
}
export function formatDate(iso: string) {
return new Date(iso).toLocaleDateString(DISPLAY_LOCALE, {
month: "short",
day: "numeric",
year: "numeric",
timeZone: DISPLAY_TIME_ZONE,
})
}
export function formatDateTime(iso: string) {
return `${formatDate(iso)}, ${formatTime(iso)}`
}