Rocky_Mountain_Vending/.pnpm-store/v10/files/71/9e933d4e10f0f67fe36884904da759440e1f56efdd65bd581a034370b9ea7bcbdae0b17bfed832c01ee63167e487685f82d1ff1f7f6d40447ac034f610210e
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

209 lines
4.2 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["לפנה״ס", "לספירה"],
abbreviated: ["לפנה״ס", "לספירה"],
wide: ["לפני הספירה", "לספירה"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["רבעון 1", "רבעון 2", "רבעון 3", "רבעון 4"],
};
const monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"ינו׳",
"פבר׳",
"מרץ",
"אפר׳",
"מאי",
"יוני",
"יולי",
"אוג׳",
"ספט׳",
"אוק׳",
"נוב׳",
"דצמ׳",
],
wide: [
"ינואר",
"פברואר",
"מרץ",
"אפריל",
"מאי",
"יוני",
"יולי",
"אוגוסט",
"ספטמבר",
"אוקטובר",
"נובמבר",
"דצמבר",
],
};
const dayValues = {
narrow: ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"],
short: ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"],
abbreviated: [
"יום א׳",
"יום ב׳",
"יום ג׳",
"יום ד׳",
"יום ה׳",
"יום ו׳",
"שבת",
],
wide: [
"יום ראשון",
"יום שני",
"יום שלישי",
"יום רביעי",
"יום חמישי",
"יום שישי",
"יום שבת",
],
};
const dayPeriodValues = {
narrow: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בוקר",
afternoon: "אחר הצהריים",
evening: "ערב",
night: "לילה",
},
abbreviated: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בוקר",
afternoon: "אחר הצהריים",
evening: "ערב",
night: "לילה",
},
wide: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בוקר",
afternoon: "אחר הצהריים",
evening: "ערב",
night: "לילה",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בבוקר",
afternoon: "בצהריים",
evening: "בערב",
night: "בלילה",
},
abbreviated: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בבוקר",
afternoon: "אחר הצהריים",
evening: "בערב",
night: "בלילה",
},
wide: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בבוקר",
afternoon: "אחר הצהריים",
evening: "בערב",
night: "בלילה",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
// We only show words till 10
if (number <= 0 || number > 10) return String(number);
const unit = String(options?.unit);
const isFemale = ["year", "hour", "minute", "second"].indexOf(unit) >= 0;
const male = [
"ראשון",
"שני",
"שלישי",
"רביעי",
"חמישי",
"שישי",
"שביעי",
"שמיני",
"תשיעי",
"עשירי",
];
const female = [
"ראשונה",
"שנייה",
"שלישית",
"רביעית",
"חמישית",
"שישית",
"שביעית",
"שמינית",
"תשיעית",
"עשירית",
];
const index = number - 1;
return isFemale ? female[index] : male[index];
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};