Rocky_Mountain_Vending/.pnpm-store/v10/files/e4/f1f65de2ca400a2671bb69b4d4d7b6215b7e0bf7d33720d35bcdaf57e67eff3a7095df385df96cb5e87efb80aec46f51dd66fa391969cb5f97c0abdba378b6
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

101 lines
1.8 KiB
Text

const formatDistanceLocale = {
lessThanXSeconds: {
one: "minder dan een seconde",
other: "minder dan {{count}} seconden",
},
xSeconds: {
one: "1 seconde",
other: "{{count}} seconden",
},
halfAMinute: "een halve minuut",
lessThanXMinutes: {
one: "minder dan een minuut",
other: "minder dan {{count}} minuten",
},
xMinutes: {
one: "een minuut",
other: "{{count}} minuten",
},
aboutXHours: {
one: "ongeveer 1 uur",
other: "ongeveer {{count}} uur",
},
xHours: {
one: "1 uur",
other: "{{count}} uur",
},
xDays: {
one: "1 dag",
other: "{{count}} dagen",
},
aboutXWeeks: {
one: "ongeveer 1 week",
other: "ongeveer {{count}} weken",
},
xWeeks: {
one: "1 week",
other: "{{count}} weken",
},
aboutXMonths: {
one: "ongeveer 1 maand",
other: "ongeveer {{count}} maanden",
},
xMonths: {
one: "1 maand",
other: "{{count}} maanden",
},
aboutXYears: {
one: "ongeveer 1 jaar",
other: "ongeveer {{count}} jaar",
},
xYears: {
one: "1 jaar",
other: "{{count}} jaar",
},
overXYears: {
one: "meer dan 1 jaar",
other: "meer dan {{count}} jaar",
},
almostXYears: {
one: "bijna 1 jaar",
other: "bijna {{count}} jaar",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "over " + result;
} else {
return result + " geleden";
}
}
return result;
};