mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-03-11 03:12:26 +08:00
init
This commit is contained in:
38
node_modules/date-fns/locale/km/_lib/formatDistance.mjs
generated
vendored
Normal file
38
node_modules/date-fns/locale/km/_lib/formatDistance.mjs
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user