mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-03-17 22:32:26 +08:00
init
This commit is contained in:
65
node_modules/date-fns/locale/kk/_lib/formatRelative.js
generated
vendored
Normal file
65
node_modules/date-fns/locale/kk/_lib/formatRelative.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
exports.formatRelative = void 0;
|
||||
var _index = require("../../../isSameWeek.js");
|
||||
|
||||
const accusativeWeekdays = [
|
||||
"жексенбіде",
|
||||
"дүйсенбіде",
|
||||
"сейсенбіде",
|
||||
"сәрсенбіде",
|
||||
"бейсенбіде",
|
||||
"жұмада",
|
||||
"сенбіде",
|
||||
];
|
||||
|
||||
function lastWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
return "'өткен " + weekday + " сағат' p'-де'";
|
||||
}
|
||||
|
||||
function thisWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
return "'" + weekday + " сағат' p'-де'";
|
||||
}
|
||||
|
||||
function nextWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
return "'келесі " + weekday + " сағат' p'-де'";
|
||||
}
|
||||
|
||||
const formatRelativeLocale = {
|
||||
lastWeek: (date, baseDate, options) => {
|
||||
const day = date.getDay();
|
||||
if ((0, _index.isSameWeek)(date, baseDate, options)) {
|
||||
return thisWeek(day);
|
||||
} else {
|
||||
return lastWeek(day);
|
||||
}
|
||||
},
|
||||
yesterday: "'кеше сағат' p'-де'",
|
||||
today: "'бүгін сағат' p'-де'",
|
||||
tomorrow: "'ертең сағат' p'-де'",
|
||||
nextWeek: (date, baseDate, options) => {
|
||||
const day = date.getDay();
|
||||
if ((0, _index.isSameWeek)(date, baseDate, options)) {
|
||||
return thisWeek(day);
|
||||
} else {
|
||||
return nextWeek(day);
|
||||
}
|
||||
},
|
||||
other: "P",
|
||||
};
|
||||
|
||||
const formatRelative = (token, date, baseDate, options) => {
|
||||
const format = formatRelativeLocale[token];
|
||||
|
||||
if (typeof format === "function") {
|
||||
return format(date, baseDate, options);
|
||||
}
|
||||
|
||||
return format;
|
||||
};
|
||||
exports.formatRelative = formatRelative;
|
||||
Reference in New Issue
Block a user