Rocky_Mountain_Vending/.pnpm-store/v10/files/41/c417436b9efc42c6b58b9215bcdcc29b14c41a155049ca863bc69b20d639fc1a650b9c9bf348da82c0f7fb6adba8e660a74136858896e621b96abfe9e9c21f
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

62 lines
1.4 KiB
Text

import { isSameWeek } from "../../../isSameWeek.js";
const accusativeWeekdays = [
"жексенбіде",
"дүйсенбіде",
"сейсенбіде",
"сәрсенбіде",
"бейсенбіде",
"жұмада",
"сенбіде",
];
function lastWeek(day) {
const weekday = accusativeWeekdays[day];
return "'өткен " + weekday + " сағат' p'-де'";
}
function thisWeek(day) {
const weekday = accusativeWeekdays[day];
return "'" + weekday + " сағат' p'-де'";
}
function nextWeek(day) {
const weekday = accusativeWeekdays[day];
return "'келесі " + weekday + " сағат' p'-де'";
}
const formatRelativeLocale = {
lastWeek: (date, baseDate, options) => {
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
},
yesterday: "'кеше сағат' p'-де'",
today: "'бүгін сағат' p'-де'",
tomorrow: "'ертең сағат' p'-де'",
nextWeek: (date, baseDate, options) => {
const day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
},
other: "P",
};
export const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};