Rocky_Mountain_Vending/.pnpm-store/v10/files/2d/900801d3fe78c993887120bb0ec6061327efa54549288810c234f8746e531cad9721fbc5bf02df79a797ee561c732f73024eb1652f573ff17ac7c77436a762
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.7 KiB
Text

const formatDistanceLocale = {
lessThanXSeconds: {
one: "sekunddan kam",
other: "{{count}} sekunddan kam",
},
xSeconds: {
one: "1 sekund",
other: "{{count}} sekund",
},
halfAMinute: "yarim minut",
lessThanXMinutes: {
one: "bir minutdan kam",
other: "{{count}} minutdan kam",
},
xMinutes: {
one: "1 minut",
other: "{{count}} minut",
},
aboutXHours: {
one: "tahminan 1 soat",
other: "tahminan {{count}} soat",
},
xHours: {
one: "1 soat",
other: "{{count}} soat",
},
xDays: {
one: "1 kun",
other: "{{count}} kun",
},
aboutXWeeks: {
one: "tahminan 1 hafta",
other: "tahminan {{count}} hafta",
},
xWeeks: {
one: "1 hafta",
other: "{{count}} hafta",
},
aboutXMonths: {
one: "tahminan 1 oy",
other: "tahminan {{count}} oy",
},
xMonths: {
one: "1 oy",
other: "{{count}} oy",
},
aboutXYears: {
one: "tahminan 1 yil",
other: "tahminan {{count}} yil",
},
xYears: {
one: "1 yil",
other: "{{count}} yil",
},
overXYears: {
one: "1 yildan ko'p",
other: "{{count}} yildan ko'p",
},
almostXYears: {
one: "deyarli 1 yil",
other: "deyarli {{count}} yil",
},
};
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 result + " dan keyin";
} else {
return result + " oldin";
}
}
return result;
};