Rocky_Mountain_Vending/.pnpm-store/v10/files/fa/e8ebc8bd11498daee9b0874b1ff6af9dc71418f8e69c09ec19b48d6af40c9d8dc12f32bfddb79dd1efd7a2854651a8878a97e67b1f165a500d3d8e62658daf
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

38 lines
1.3 KiB
Text

const formatDistanceLocale = {
lessThanXSeconds: "តិចជាង {{count}} វិនាទី",
xSeconds: "{{count}} វិនាទី",
halfAMinute: "កន្លះនាទី",
lessThanXMinutes: "តិចជាង {{count}} នាទី",
xMinutes: "{{count}} នាទី",
aboutXHours: "ប្រហែល {{count}} ម៉ោង",
xHours: "{{count}} ម៉ោង",
xDays: "{{count}} ថ្ងៃ",
aboutXWeeks: "ប្រហែល {{count}} សប្តាហ៍",
xWeeks: "{{count}} សប្តាហ៍",
aboutXMonths: "ប្រហែល {{count}} ខែ",
xMonths: "{{count}} ខែ",
aboutXYears: "ប្រហែល {{count}} ឆ្នាំ",
xYears: "{{count}} ឆ្នាំ",
overXYears: "ជាង {{count}} ឆ្នាំ",
almostXYears: "ជិត {{count}} ឆ្នាំ",
};
export const formatDistance = (token, count, options) => {
const tokenValue = formatDistanceLocale[token];
let result = tokenValue;
if (typeof count === "number") {
result = result.replace("{{count}}", count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "ក្នុងរយៈពេល " + result;
} else {
return result + "មុន";
}
}
return result;
};