mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-03-09 10:22:25 +08:00
init
This commit is contained in:
35
node_modules/date-fns/locale/hu/_lib/formatRelative.mjs
generated
vendored
Normal file
35
node_modules/date-fns/locale/hu/_lib/formatRelative.mjs
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
const accusativeWeekdays = [
|
||||
"vasárnap",
|
||||
"hétfőn",
|
||||
"kedden",
|
||||
"szerdán",
|
||||
"csütörtökön",
|
||||
"pénteken",
|
||||
"szombaton",
|
||||
];
|
||||
|
||||
function week(isFuture) {
|
||||
return (date) => {
|
||||
const weekday = accusativeWeekdays[date.getDay()];
|
||||
const prefix = isFuture ? "" : "'múlt' ";
|
||||
return `${prefix}'${weekday}' p'-kor'`;
|
||||
};
|
||||
}
|
||||
const formatRelativeLocale = {
|
||||
lastWeek: week(false),
|
||||
yesterday: "'tegnap' p'-kor'",
|
||||
today: "'ma' p'-kor'",
|
||||
tomorrow: "'holnap' p'-kor'",
|
||||
nextWeek: week(true),
|
||||
other: "P",
|
||||
};
|
||||
|
||||
export const formatRelative = (token, date) => {
|
||||
const format = formatRelativeLocale[token];
|
||||
|
||||
if (typeof format === "function") {
|
||||
return format(date);
|
||||
}
|
||||
|
||||
return format;
|
||||
};
|
||||
Reference in New Issue
Block a user