You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/node_modules/date-fns/locale/mk/_lib/localize.js

122 lines
2.5 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["пр.н.е.", "н.е."],
abbreviated: ["пред н. е.", "н. е."],
wide: ["пред нашата ера", "нашата ера"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-ви кв.", "2-ри кв.", "3-ти кв.", "4-ти кв."],
wide: ["1-ви квартал", "2-ри квартал", "3-ти квартал", "4-ти квартал"],
};
const monthValues = {
abbreviated: [
"јан",
"фев",
"мар",
"апр",
"мај",
"јун",
"јул",
"авг",
"септ",
"окт",
"ноем",
"дек",
],
wide: [
"јануари",
"февруари",
"март",
"април",
"мај",
"јуни",
"јули",
"август",
"септември",
"октомври",
"ноември",
"декември",
],
};
const dayValues = {
narrow: ["Н", "П", "В", "С", "Ч", "П", "С"],
short: ["не", "по", "вт", "ср", "че", "пе", "са"],
abbreviated: ["нед", "пон", "вто", "сре", "чет", "пет", "саб"],
wide: [
"недела",
"понеделник",
"вторник",
"среда",
"четврток",
"петок",
"сабота",
],
};
const dayPeriodValues = {
wide: {
am: "претпладне",
pm: "попладне",
midnight: "полноќ",
noon: "напладне",
morning: "наутро",
afternoon: "попладне",
evening: "навечер",
night: "ноќе",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
const rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "-ви";
case 2:
return number + "-ри";
case 7:
case 8:
return number + "-ми";
}
}
return number + "-ти";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
}),
};