Rocky_Mountain_Vending/.pnpm-store/v10/files/be/59150e674f7497afbf5c17add2d56bbedb9e9334cdd11ba507e6636023d01b136062e01f1c8099b273e6bdf563a0a218ee33fcf031e8242d90894e6aa63f0b
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

35 lines
711 B
Text

const accusativeWeekdays = [
"vasárnap",
"hétfőn",
"kedden",
"szerdán",
"csütörtökön",
"pénteken",
"szombaton",
];
function week(isFuture) {
return (date) => {
const weekday = accusativeWeekdays[date.getDay()];
const prefix = isFuture ? "" : "'múlt' ";
return `${prefix}'${weekday}' p'-kor'`;
};
}
const formatRelativeLocale = {
lastWeek: week(false),
yesterday: "'tegnap' p'-kor'",
today: "'ma' p'-kor'",
tomorrow: "'holnap' p'-kor'",
nextWeek: week(true),
other: "P",
};
export const formatRelative = (token, date) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};