v1.0 with SW PWA enabled
This commit is contained in:
2
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.d.mts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.d.mts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { FormatDistanceFn } from "../../types.js";
|
||||
export declare const formatDistance: FormatDistanceFn;
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.d.ts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { FormatDistanceFn } from "../../types.js";
|
||||
export declare const formatDistance: FormatDistanceFn;
|
||||
230
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.js
generated
vendored
Normal file
230
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.js
generated
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
"use strict";
|
||||
exports.formatDistance = void 0;
|
||||
|
||||
function declensionGroup(scheme, count) {
|
||||
if (count === 1 && scheme.one) {
|
||||
return scheme.one;
|
||||
}
|
||||
|
||||
if (count >= 2 && count <= 4 && scheme.twoFour) {
|
||||
return scheme.twoFour;
|
||||
}
|
||||
|
||||
// if count === null || count === 0 || count >= 5
|
||||
return scheme.other;
|
||||
}
|
||||
|
||||
function declension(scheme, count, time) {
|
||||
const group = declensionGroup(scheme, count);
|
||||
const finalText = group[time];
|
||||
return finalText.replace("{{count}}", String(count));
|
||||
}
|
||||
|
||||
function extractPreposition(token) {
|
||||
const result = ["lessThan", "about", "over", "almost"].filter(
|
||||
function (preposition) {
|
||||
return !!token.match(new RegExp("^" + preposition));
|
||||
},
|
||||
);
|
||||
|
||||
return result[0];
|
||||
}
|
||||
|
||||
function prefixPreposition(preposition) {
|
||||
let translation = "";
|
||||
|
||||
if (preposition === "almost") {
|
||||
translation = "takmer";
|
||||
}
|
||||
|
||||
if (preposition === "about") {
|
||||
translation = "približne";
|
||||
}
|
||||
|
||||
return translation.length > 0 ? translation + " " : "";
|
||||
}
|
||||
|
||||
function suffixPreposition(preposition) {
|
||||
let translation = "";
|
||||
|
||||
if (preposition === "lessThan") {
|
||||
translation = "menej než";
|
||||
}
|
||||
|
||||
if (preposition === "over") {
|
||||
translation = "viac než";
|
||||
}
|
||||
|
||||
return translation.length > 0 ? translation + " " : "";
|
||||
}
|
||||
|
||||
function lowercaseFirstLetter(string) {
|
||||
return string.charAt(0).toLowerCase() + string.slice(1);
|
||||
}
|
||||
|
||||
const formatDistanceLocale = {
|
||||
xSeconds: {
|
||||
one: {
|
||||
present: "sekunda",
|
||||
past: "sekundou",
|
||||
future: "sekundu",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} sekundy",
|
||||
past: "{{count}} sekundami",
|
||||
future: "{{count}} sekundy",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} sekúnd",
|
||||
past: "{{count}} sekundami",
|
||||
future: "{{count}} sekúnd",
|
||||
},
|
||||
},
|
||||
|
||||
halfAMinute: {
|
||||
other: {
|
||||
present: "pol minúty",
|
||||
past: "pol minútou",
|
||||
future: "pol minúty",
|
||||
},
|
||||
},
|
||||
|
||||
xMinutes: {
|
||||
one: {
|
||||
present: "minúta",
|
||||
past: "minútou",
|
||||
future: "minútu",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} minúty",
|
||||
past: "{{count}} minútami",
|
||||
future: "{{count}} minúty",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} minút",
|
||||
past: "{{count}} minútami",
|
||||
future: "{{count}} minút",
|
||||
},
|
||||
},
|
||||
|
||||
xHours: {
|
||||
one: {
|
||||
present: "hodina",
|
||||
past: "hodinou",
|
||||
future: "hodinu",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} hodiny",
|
||||
past: "{{count}} hodinami",
|
||||
future: "{{count}} hodiny",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} hodín",
|
||||
past: "{{count}} hodinami",
|
||||
future: "{{count}} hodín",
|
||||
},
|
||||
},
|
||||
|
||||
xDays: {
|
||||
one: {
|
||||
present: "deň",
|
||||
past: "dňom",
|
||||
future: "deň",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} dni",
|
||||
past: "{{count}} dňami",
|
||||
future: "{{count}} dni",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} dní",
|
||||
past: "{{count}} dňami",
|
||||
future: "{{count}} dní",
|
||||
},
|
||||
},
|
||||
|
||||
xWeeks: {
|
||||
one: {
|
||||
present: "týždeň",
|
||||
past: "týždňom",
|
||||
future: "týždeň",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} týždne",
|
||||
past: "{{count}} týždňami",
|
||||
future: "{{count}} týždne",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} týždňov",
|
||||
past: "{{count}} týždňami",
|
||||
future: "{{count}} týždňov",
|
||||
},
|
||||
},
|
||||
|
||||
xMonths: {
|
||||
one: {
|
||||
present: "mesiac",
|
||||
past: "mesiacom",
|
||||
future: "mesiac",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} mesiace",
|
||||
past: "{{count}} mesiacmi",
|
||||
future: "{{count}} mesiace",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} mesiacov",
|
||||
past: "{{count}} mesiacmi",
|
||||
future: "{{count}} mesiacov",
|
||||
},
|
||||
},
|
||||
|
||||
xYears: {
|
||||
one: {
|
||||
present: "rok",
|
||||
past: "rokom",
|
||||
future: "rok",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} roky",
|
||||
past: "{{count}} rokmi",
|
||||
future: "{{count}} roky",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} rokov",
|
||||
past: "{{count}} rokmi",
|
||||
future: "{{count}} rokov",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const formatDistance = (token, count, options) => {
|
||||
const preposition = extractPreposition(token) || "";
|
||||
const key = lowercaseFirstLetter(token.substring(preposition.length));
|
||||
const scheme = formatDistanceLocale[key];
|
||||
|
||||
if (!options?.addSuffix) {
|
||||
return (
|
||||
prefixPreposition(preposition) +
|
||||
suffixPreposition(preposition) +
|
||||
declension(scheme, count, "present")
|
||||
);
|
||||
}
|
||||
|
||||
if (options.comparison && options.comparison > 0) {
|
||||
return (
|
||||
prefixPreposition(preposition) +
|
||||
"o " +
|
||||
suffixPreposition(preposition) +
|
||||
declension(scheme, count, "future")
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
prefixPreposition(preposition) +
|
||||
"pred " +
|
||||
suffixPreposition(preposition) +
|
||||
declension(scheme, count, "past")
|
||||
);
|
||||
}
|
||||
};
|
||||
exports.formatDistance = formatDistance;
|
||||
226
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.mjs
generated
vendored
Normal file
226
frontend/node_modules/date-fns/locale/sk/_lib/formatDistance.mjs
generated
vendored
Normal file
@ -0,0 +1,226 @@
|
||||
function declensionGroup(scheme, count) {
|
||||
if (count === 1 && scheme.one) {
|
||||
return scheme.one;
|
||||
}
|
||||
|
||||
if (count >= 2 && count <= 4 && scheme.twoFour) {
|
||||
return scheme.twoFour;
|
||||
}
|
||||
|
||||
// if count === null || count === 0 || count >= 5
|
||||
return scheme.other;
|
||||
}
|
||||
|
||||
function declension(scheme, count, time) {
|
||||
const group = declensionGroup(scheme, count);
|
||||
const finalText = group[time];
|
||||
return finalText.replace("{{count}}", String(count));
|
||||
}
|
||||
|
||||
function extractPreposition(token) {
|
||||
const result = ["lessThan", "about", "over", "almost"].filter(
|
||||
function (preposition) {
|
||||
return !!token.match(new RegExp("^" + preposition));
|
||||
},
|
||||
);
|
||||
|
||||
return result[0];
|
||||
}
|
||||
|
||||
function prefixPreposition(preposition) {
|
||||
let translation = "";
|
||||
|
||||
if (preposition === "almost") {
|
||||
translation = "takmer";
|
||||
}
|
||||
|
||||
if (preposition === "about") {
|
||||
translation = "približne";
|
||||
}
|
||||
|
||||
return translation.length > 0 ? translation + " " : "";
|
||||
}
|
||||
|
||||
function suffixPreposition(preposition) {
|
||||
let translation = "";
|
||||
|
||||
if (preposition === "lessThan") {
|
||||
translation = "menej než";
|
||||
}
|
||||
|
||||
if (preposition === "over") {
|
||||
translation = "viac než";
|
||||
}
|
||||
|
||||
return translation.length > 0 ? translation + " " : "";
|
||||
}
|
||||
|
||||
function lowercaseFirstLetter(string) {
|
||||
return string.charAt(0).toLowerCase() + string.slice(1);
|
||||
}
|
||||
|
||||
const formatDistanceLocale = {
|
||||
xSeconds: {
|
||||
one: {
|
||||
present: "sekunda",
|
||||
past: "sekundou",
|
||||
future: "sekundu",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} sekundy",
|
||||
past: "{{count}} sekundami",
|
||||
future: "{{count}} sekundy",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} sekúnd",
|
||||
past: "{{count}} sekundami",
|
||||
future: "{{count}} sekúnd",
|
||||
},
|
||||
},
|
||||
|
||||
halfAMinute: {
|
||||
other: {
|
||||
present: "pol minúty",
|
||||
past: "pol minútou",
|
||||
future: "pol minúty",
|
||||
},
|
||||
},
|
||||
|
||||
xMinutes: {
|
||||
one: {
|
||||
present: "minúta",
|
||||
past: "minútou",
|
||||
future: "minútu",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} minúty",
|
||||
past: "{{count}} minútami",
|
||||
future: "{{count}} minúty",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} minút",
|
||||
past: "{{count}} minútami",
|
||||
future: "{{count}} minút",
|
||||
},
|
||||
},
|
||||
|
||||
xHours: {
|
||||
one: {
|
||||
present: "hodina",
|
||||
past: "hodinou",
|
||||
future: "hodinu",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} hodiny",
|
||||
past: "{{count}} hodinami",
|
||||
future: "{{count}} hodiny",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} hodín",
|
||||
past: "{{count}} hodinami",
|
||||
future: "{{count}} hodín",
|
||||
},
|
||||
},
|
||||
|
||||
xDays: {
|
||||
one: {
|
||||
present: "deň",
|
||||
past: "dňom",
|
||||
future: "deň",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} dni",
|
||||
past: "{{count}} dňami",
|
||||
future: "{{count}} dni",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} dní",
|
||||
past: "{{count}} dňami",
|
||||
future: "{{count}} dní",
|
||||
},
|
||||
},
|
||||
|
||||
xWeeks: {
|
||||
one: {
|
||||
present: "týždeň",
|
||||
past: "týždňom",
|
||||
future: "týždeň",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} týždne",
|
||||
past: "{{count}} týždňami",
|
||||
future: "{{count}} týždne",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} týždňov",
|
||||
past: "{{count}} týždňami",
|
||||
future: "{{count}} týždňov",
|
||||
},
|
||||
},
|
||||
|
||||
xMonths: {
|
||||
one: {
|
||||
present: "mesiac",
|
||||
past: "mesiacom",
|
||||
future: "mesiac",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} mesiace",
|
||||
past: "{{count}} mesiacmi",
|
||||
future: "{{count}} mesiace",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} mesiacov",
|
||||
past: "{{count}} mesiacmi",
|
||||
future: "{{count}} mesiacov",
|
||||
},
|
||||
},
|
||||
|
||||
xYears: {
|
||||
one: {
|
||||
present: "rok",
|
||||
past: "rokom",
|
||||
future: "rok",
|
||||
},
|
||||
twoFour: {
|
||||
present: "{{count}} roky",
|
||||
past: "{{count}} rokmi",
|
||||
future: "{{count}} roky",
|
||||
},
|
||||
other: {
|
||||
present: "{{count}} rokov",
|
||||
past: "{{count}} rokmi",
|
||||
future: "{{count}} rokov",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const formatDistance = (token, count, options) => {
|
||||
const preposition = extractPreposition(token) || "";
|
||||
const key = lowercaseFirstLetter(token.substring(preposition.length));
|
||||
const scheme = formatDistanceLocale[key];
|
||||
|
||||
if (!options?.addSuffix) {
|
||||
return (
|
||||
prefixPreposition(preposition) +
|
||||
suffixPreposition(preposition) +
|
||||
declension(scheme, count, "present")
|
||||
);
|
||||
}
|
||||
|
||||
if (options.comparison && options.comparison > 0) {
|
||||
return (
|
||||
prefixPreposition(preposition) +
|
||||
"o " +
|
||||
suffixPreposition(preposition) +
|
||||
declension(scheme, count, "future")
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
prefixPreposition(preposition) +
|
||||
"pred " +
|
||||
suffixPreposition(preposition) +
|
||||
declension(scheme, count, "past")
|
||||
);
|
||||
}
|
||||
};
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.d.mts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.d.mts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { FormatLong } from "../../types.js";
|
||||
export declare const formatLong: FormatLong;
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.d.ts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { FormatLong } from "../../types.js";
|
||||
export declare const formatLong: FormatLong;
|
||||
44
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.js
generated
vendored
Normal file
44
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
exports.formatLong = void 0;
|
||||
var _index = require("../../_lib/buildFormatLongFn.js");
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#1986
|
||||
const dateFormats = {
|
||||
full: "EEEE d. MMMM y",
|
||||
long: "d. MMMM y",
|
||||
medium: "d. M. y",
|
||||
short: "d. M. y",
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#2149
|
||||
const timeFormats = {
|
||||
full: "H:mm:ss zzzz",
|
||||
long: "H:mm:ss z",
|
||||
medium: "H:mm:ss",
|
||||
short: "H:mm",
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#1994
|
||||
const dateTimeFormats = {
|
||||
full: "{{date}}, {{time}}",
|
||||
long: "{{date}}, {{time}}",
|
||||
medium: "{{date}}, {{time}}",
|
||||
short: "{{date}} {{time}}",
|
||||
};
|
||||
|
||||
const formatLong = (exports.formatLong = {
|
||||
date: (0, _index.buildFormatLongFn)({
|
||||
formats: dateFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
time: (0, _index.buildFormatLongFn)({
|
||||
formats: timeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
dateTime: (0, _index.buildFormatLongFn)({
|
||||
formats: dateTimeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
});
|
||||
42
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.mjs
generated
vendored
Normal file
42
frontend/node_modules/date-fns/locale/sk/_lib/formatLong.mjs
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#1986
|
||||
const dateFormats = {
|
||||
full: "EEEE d. MMMM y",
|
||||
long: "d. MMMM y",
|
||||
medium: "d. M. y",
|
||||
short: "d. M. y",
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#2149
|
||||
const timeFormats = {
|
||||
full: "H:mm:ss zzzz",
|
||||
long: "H:mm:ss z",
|
||||
medium: "H:mm:ss",
|
||||
short: "H:mm",
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#1994
|
||||
const dateTimeFormats = {
|
||||
full: "{{date}}, {{time}}",
|
||||
long: "{{date}}, {{time}}",
|
||||
medium: "{{date}}, {{time}}",
|
||||
short: "{{date}} {{time}}",
|
||||
};
|
||||
|
||||
export const formatLong = {
|
||||
date: buildFormatLongFn({
|
||||
formats: dateFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
time: buildFormatLongFn({
|
||||
formats: timeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
dateTime: buildFormatLongFn({
|
||||
formats: dateTimeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
};
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.d.mts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.d.mts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { FormatRelativeFn } from "../../types.js";
|
||||
export declare const formatRelative: FormatRelativeFn;
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.d.ts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { FormatRelativeFn } from "../../types.js";
|
||||
export declare const formatRelative: FormatRelativeFn;
|
||||
84
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.js
generated
vendored
Normal file
84
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.js
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
exports.formatRelative = void 0;
|
||||
var _index = require("../../../isSameWeek.js");
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#1308
|
||||
const accusativeWeekdays = [
|
||||
"nedeľu",
|
||||
"pondelok",
|
||||
"utorok",
|
||||
"stredu",
|
||||
"štvrtok",
|
||||
"piatok",
|
||||
"sobotu",
|
||||
];
|
||||
|
||||
function lastWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
switch (day) {
|
||||
case 0: /* Sun */
|
||||
case 3: /* Wed */
|
||||
case 6 /* Sat */:
|
||||
return "'minulú " + weekday + " o' p";
|
||||
default:
|
||||
return "'minulý' eeee 'o' p";
|
||||
}
|
||||
}
|
||||
|
||||
function thisWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
if (day === 4 /* Thu */) {
|
||||
return "'vo' eeee 'o' p";
|
||||
} else {
|
||||
return "'v " + weekday + " o' p";
|
||||
}
|
||||
}
|
||||
|
||||
function nextWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
switch (day) {
|
||||
case 0: /* Sun */
|
||||
case 4: /* Wed */
|
||||
case 6 /* Sat */:
|
||||
return "'budúcu " + weekday + " o' p";
|
||||
default:
|
||||
return "'budúci' eeee 'o' 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: "'včera o' p",
|
||||
today: "'dnes o' p",
|
||||
tomorrow: "'zajtra o' 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;
|
||||
81
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.mjs
generated
vendored
Normal file
81
frontend/node_modules/date-fns/locale/sk/_lib/formatRelative.mjs
generated
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
import { isSameWeek } from "../../../isSameWeek.mjs";
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html?hide#1308
|
||||
const accusativeWeekdays = [
|
||||
"nedeľu",
|
||||
"pondelok",
|
||||
"utorok",
|
||||
"stredu",
|
||||
"štvrtok",
|
||||
"piatok",
|
||||
"sobotu",
|
||||
];
|
||||
|
||||
function lastWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
switch (day) {
|
||||
case 0: /* Sun */
|
||||
case 3: /* Wed */
|
||||
case 6 /* Sat */:
|
||||
return "'minulú " + weekday + " o' p";
|
||||
default:
|
||||
return "'minulý' eeee 'o' p";
|
||||
}
|
||||
}
|
||||
|
||||
function thisWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
if (day === 4 /* Thu */) {
|
||||
return "'vo' eeee 'o' p";
|
||||
} else {
|
||||
return "'v " + weekday + " o' p";
|
||||
}
|
||||
}
|
||||
|
||||
function nextWeek(day) {
|
||||
const weekday = accusativeWeekdays[day];
|
||||
|
||||
switch (day) {
|
||||
case 0: /* Sun */
|
||||
case 4: /* Wed */
|
||||
case 6 /* Sat */:
|
||||
return "'budúcu " + weekday + " o' p";
|
||||
default:
|
||||
return "'budúci' eeee 'o' p";
|
||||
}
|
||||
}
|
||||
|
||||
const formatRelativeLocale = {
|
||||
lastWeek: (date, baseDate, options) => {
|
||||
const day = date.getDay();
|
||||
if (isSameWeek(date, baseDate, options)) {
|
||||
return thisWeek(day);
|
||||
} else {
|
||||
return lastWeek(day);
|
||||
}
|
||||
},
|
||||
yesterday: "'včera o' p",
|
||||
today: "'dnes o' p",
|
||||
tomorrow: "'zajtra o' p",
|
||||
nextWeek: (date, baseDate, options) => {
|
||||
const day = date.getDay();
|
||||
if (isSameWeek(date, baseDate, options)) {
|
||||
return thisWeek(day);
|
||||
} else {
|
||||
return nextWeek(day);
|
||||
}
|
||||
},
|
||||
other: "P",
|
||||
};
|
||||
|
||||
export const formatRelative = (token, date, baseDate, options) => {
|
||||
const format = formatRelativeLocale[token];
|
||||
|
||||
if (typeof format === "function") {
|
||||
return format(date, baseDate, options);
|
||||
}
|
||||
|
||||
return format;
|
||||
};
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/localize.d.mts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/localize.d.mts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { Localize } from "../../types.js";
|
||||
export declare const localize: Localize;
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/localize.d.ts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/localize.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { Localize } from "../../types.js";
|
||||
export declare const localize: Localize;
|
||||
205
frontend/node_modules/date-fns/locale/sk/_lib/localize.js
generated
vendored
Normal file
205
frontend/node_modules/date-fns/locale/sk/_lib/localize.js
generated
vendored
Normal file
@ -0,0 +1,205 @@
|
||||
"use strict";
|
||||
exports.localize = void 0;
|
||||
var _index = require("../../_lib/buildLocalizeFn.js");
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1772
|
||||
const eraValues = {
|
||||
narrow: ["pred Kr.", "po Kr."],
|
||||
abbreviated: ["pred Kr.", "po Kr."],
|
||||
wide: ["pred Kristom", "po Kristovi"],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1780
|
||||
const quarterValues = {
|
||||
narrow: ["1", "2", "3", "4"],
|
||||
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
||||
wide: ["1. štvrťrok", "2. štvrťrok", "3. štvrťrok", "4. štvrťrok"],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1804
|
||||
const monthValues = {
|
||||
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
||||
abbreviated: [
|
||||
"jan",
|
||||
"feb",
|
||||
"mar",
|
||||
"apr",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"aug",
|
||||
"sep",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec",
|
||||
],
|
||||
|
||||
wide: [
|
||||
"január",
|
||||
"február",
|
||||
"marec",
|
||||
"apríl",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"august",
|
||||
"september",
|
||||
"október",
|
||||
"november",
|
||||
"december",
|
||||
],
|
||||
};
|
||||
const formattingMonthValues = {
|
||||
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
||||
abbreviated: [
|
||||
"jan",
|
||||
"feb",
|
||||
"mar",
|
||||
"apr",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"aug",
|
||||
"sep",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec",
|
||||
],
|
||||
|
||||
wide: [
|
||||
"januára",
|
||||
"februára",
|
||||
"marca",
|
||||
"apríla",
|
||||
"mája",
|
||||
"júna",
|
||||
"júla",
|
||||
"augusta",
|
||||
"septembra",
|
||||
"októbra",
|
||||
"novembra",
|
||||
"decembra",
|
||||
],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1876
|
||||
const dayValues = {
|
||||
narrow: ["n", "p", "u", "s", "š", "p", "s"],
|
||||
short: ["ne", "po", "ut", "st", "št", "pi", "so"],
|
||||
abbreviated: ["ne", "po", "ut", "st", "št", "pi", "so"],
|
||||
wide: [
|
||||
"nedeľa",
|
||||
"pondelok",
|
||||
"utorok",
|
||||
"streda",
|
||||
"štvrtok",
|
||||
"piatok",
|
||||
"sobota",
|
||||
],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1932
|
||||
const dayPeriodValues = {
|
||||
narrow: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "poln.",
|
||||
noon: "pol.",
|
||||
morning: "ráno",
|
||||
afternoon: "pop.",
|
||||
evening: "več.",
|
||||
night: "noc",
|
||||
},
|
||||
abbreviated: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "poln.",
|
||||
noon: "pol.",
|
||||
morning: "ráno",
|
||||
afternoon: "popol.",
|
||||
evening: "večer",
|
||||
night: "noc",
|
||||
},
|
||||
wide: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "polnoc",
|
||||
noon: "poludnie",
|
||||
morning: "ráno",
|
||||
afternoon: "popoludnie",
|
||||
evening: "večer",
|
||||
night: "noc",
|
||||
},
|
||||
};
|
||||
|
||||
const formattingDayPeriodValues = {
|
||||
narrow: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "o poln.",
|
||||
noon: "nap.",
|
||||
morning: "ráno",
|
||||
afternoon: "pop.",
|
||||
evening: "več.",
|
||||
night: "v n.",
|
||||
},
|
||||
abbreviated: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "o poln.",
|
||||
noon: "napol.",
|
||||
morning: "ráno",
|
||||
afternoon: "popol.",
|
||||
evening: "večer",
|
||||
night: "v noci",
|
||||
},
|
||||
wide: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "o polnoci",
|
||||
noon: "napoludnie",
|
||||
morning: "ráno",
|
||||
afternoon: "popoludní",
|
||||
evening: "večer",
|
||||
night: "v noci",
|
||||
},
|
||||
};
|
||||
|
||||
const ordinalNumber = (dirtyNumber, _options) => {
|
||||
const number = Number(dirtyNumber);
|
||||
return number + ".";
|
||||
};
|
||||
|
||||
const localize = (exports.localize = {
|
||||
ordinalNumber,
|
||||
|
||||
era: (0, _index.buildLocalizeFn)({
|
||||
values: eraValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
quarter: (0, _index.buildLocalizeFn)({
|
||||
values: quarterValues,
|
||||
defaultWidth: "wide",
|
||||
argumentCallback: (quarter) => quarter - 1,
|
||||
}),
|
||||
|
||||
month: (0, _index.buildLocalizeFn)({
|
||||
values: monthValues,
|
||||
defaultWidth: "wide",
|
||||
formattingValues: formattingMonthValues,
|
||||
defaultFormattingWidth: "wide",
|
||||
}),
|
||||
|
||||
day: (0, _index.buildLocalizeFn)({
|
||||
values: dayValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
dayPeriod: (0, _index.buildLocalizeFn)({
|
||||
values: dayPeriodValues,
|
||||
defaultWidth: "wide",
|
||||
formattingValues: formattingDayPeriodValues,
|
||||
defaultFormattingWidth: "wide",
|
||||
}),
|
||||
});
|
||||
203
frontend/node_modules/date-fns/locale/sk/_lib/localize.mjs
generated
vendored
Normal file
203
frontend/node_modules/date-fns/locale/sk/_lib/localize.mjs
generated
vendored
Normal file
@ -0,0 +1,203 @@
|
||||
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1772
|
||||
const eraValues = {
|
||||
narrow: ["pred Kr.", "po Kr."],
|
||||
abbreviated: ["pred Kr.", "po Kr."],
|
||||
wide: ["pred Kristom", "po Kristovi"],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1780
|
||||
const quarterValues = {
|
||||
narrow: ["1", "2", "3", "4"],
|
||||
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
||||
wide: ["1. štvrťrok", "2. štvrťrok", "3. štvrťrok", "4. štvrťrok"],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1804
|
||||
const monthValues = {
|
||||
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
||||
abbreviated: [
|
||||
"jan",
|
||||
"feb",
|
||||
"mar",
|
||||
"apr",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"aug",
|
||||
"sep",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec",
|
||||
],
|
||||
|
||||
wide: [
|
||||
"január",
|
||||
"február",
|
||||
"marec",
|
||||
"apríl",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"august",
|
||||
"september",
|
||||
"október",
|
||||
"november",
|
||||
"december",
|
||||
],
|
||||
};
|
||||
const formattingMonthValues = {
|
||||
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
||||
abbreviated: [
|
||||
"jan",
|
||||
"feb",
|
||||
"mar",
|
||||
"apr",
|
||||
"máj",
|
||||
"jún",
|
||||
"júl",
|
||||
"aug",
|
||||
"sep",
|
||||
"okt",
|
||||
"nov",
|
||||
"dec",
|
||||
],
|
||||
|
||||
wide: [
|
||||
"januára",
|
||||
"februára",
|
||||
"marca",
|
||||
"apríla",
|
||||
"mája",
|
||||
"júna",
|
||||
"júla",
|
||||
"augusta",
|
||||
"septembra",
|
||||
"októbra",
|
||||
"novembra",
|
||||
"decembra",
|
||||
],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1876
|
||||
const dayValues = {
|
||||
narrow: ["n", "p", "u", "s", "š", "p", "s"],
|
||||
short: ["ne", "po", "ut", "st", "št", "pi", "so"],
|
||||
abbreviated: ["ne", "po", "ut", "st", "št", "pi", "so"],
|
||||
wide: [
|
||||
"nedeľa",
|
||||
"pondelok",
|
||||
"utorok",
|
||||
"streda",
|
||||
"štvrtok",
|
||||
"piatok",
|
||||
"sobota",
|
||||
],
|
||||
};
|
||||
|
||||
// https://www.unicode.org/cldr/charts/32/summary/sk.html#1932
|
||||
const dayPeriodValues = {
|
||||
narrow: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "poln.",
|
||||
noon: "pol.",
|
||||
morning: "ráno",
|
||||
afternoon: "pop.",
|
||||
evening: "več.",
|
||||
night: "noc",
|
||||
},
|
||||
abbreviated: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "poln.",
|
||||
noon: "pol.",
|
||||
morning: "ráno",
|
||||
afternoon: "popol.",
|
||||
evening: "večer",
|
||||
night: "noc",
|
||||
},
|
||||
wide: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "polnoc",
|
||||
noon: "poludnie",
|
||||
morning: "ráno",
|
||||
afternoon: "popoludnie",
|
||||
evening: "večer",
|
||||
night: "noc",
|
||||
},
|
||||
};
|
||||
|
||||
const formattingDayPeriodValues = {
|
||||
narrow: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "o poln.",
|
||||
noon: "nap.",
|
||||
morning: "ráno",
|
||||
afternoon: "pop.",
|
||||
evening: "več.",
|
||||
night: "v n.",
|
||||
},
|
||||
abbreviated: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "o poln.",
|
||||
noon: "napol.",
|
||||
morning: "ráno",
|
||||
afternoon: "popol.",
|
||||
evening: "večer",
|
||||
night: "v noci",
|
||||
},
|
||||
wide: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
midnight: "o polnoci",
|
||||
noon: "napoludnie",
|
||||
morning: "ráno",
|
||||
afternoon: "popoludní",
|
||||
evening: "večer",
|
||||
night: "v noci",
|
||||
},
|
||||
};
|
||||
|
||||
const ordinalNumber = (dirtyNumber, _options) => {
|
||||
const number = Number(dirtyNumber);
|
||||
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",
|
||||
formattingValues: formattingMonthValues,
|
||||
defaultFormattingWidth: "wide",
|
||||
}),
|
||||
|
||||
day: buildLocalizeFn({
|
||||
values: dayValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
dayPeriod: buildLocalizeFn({
|
||||
values: dayPeriodValues,
|
||||
defaultWidth: "wide",
|
||||
formattingValues: formattingDayPeriodValues,
|
||||
defaultFormattingWidth: "wide",
|
||||
}),
|
||||
};
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/match.d.mts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/match.d.mts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { Match } from "../../types.js";
|
||||
export declare const match: Match;
|
||||
2
frontend/node_modules/date-fns/locale/sk/_lib/match.d.ts
generated
vendored
Normal file
2
frontend/node_modules/date-fns/locale/sk/_lib/match.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import type { Match } from "../../types.js";
|
||||
export declare const match: Match;
|
||||
138
frontend/node_modules/date-fns/locale/sk/_lib/match.js
generated
vendored
Normal file
138
frontend/node_modules/date-fns/locale/sk/_lib/match.js
generated
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
"use strict";
|
||||
exports.match = void 0;
|
||||
|
||||
var _index = require("../../_lib/buildMatchFn.js");
|
||||
var _index2 = require("../../_lib/buildMatchPatternFn.js");
|
||||
|
||||
const matchOrdinalNumberPattern = /^(\d+)\.?/i;
|
||||
const parseOrdinalNumberPattern = /\d+/i;
|
||||
|
||||
const matchEraPatterns = {
|
||||
narrow: /^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,
|
||||
abbreviated: /^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,
|
||||
wide: /^(pred Kristom|pred na[šs][íi]m letopo[čc]tom|po Kristovi|n[áa][šs]ho letopo[čc]tu)/i,
|
||||
};
|
||||
const parseEraPatterns = {
|
||||
any: [/^pr/i, /^(po|n)/i],
|
||||
};
|
||||
|
||||
const matchQuarterPatterns = {
|
||||
narrow: /^[1234]/i,
|
||||
abbreviated: /^q[1234]/i,
|
||||
wide: /^[1234]\. [šs]tvr[ťt]rok/i,
|
||||
};
|
||||
const parseQuarterPatterns = {
|
||||
any: [/1/i, /2/i, /3/i, /4/i],
|
||||
};
|
||||
|
||||
const matchMonthPatterns = {
|
||||
narrow: /^[jfmasond]/i,
|
||||
abbreviated: /^(jan|feb|mar|apr|m[áa]j|j[úu]n|j[úu]l|aug|sep|okt|nov|dec)/i,
|
||||
wide: /^(janu[áa]ra?|febru[áa]ra?|(marec|marca)|apr[íi]la?|m[áa]ja?|j[úu]na?|j[úu]la?|augusta?|(september|septembra)|(okt[óo]ber|okt[óo]bra)|(november|novembra)|(december|decembra))/i,
|
||||
};
|
||||
const parseMonthPatterns = {
|
||||
narrow: [
|
||||
/^j/i,
|
||||
/^f/i,
|
||||
/^m/i,
|
||||
/^a/i,
|
||||
/^m/i,
|
||||
/^j/i,
|
||||
/^j/i,
|
||||
/^a/i,
|
||||
/^s/i,
|
||||
/^o/i,
|
||||
/^n/i,
|
||||
/^d/i,
|
||||
],
|
||||
|
||||
any: [
|
||||
/^ja/i,
|
||||
/^f/i,
|
||||
/^mar/i,
|
||||
/^ap/i,
|
||||
/^m[áa]j/i,
|
||||
/^j[úu]n/i,
|
||||
/^j[úu]l/i,
|
||||
/^au/i,
|
||||
/^s/i,
|
||||
/^o/i,
|
||||
/^n/i,
|
||||
/^d/i,
|
||||
],
|
||||
};
|
||||
|
||||
const matchDayPatterns = {
|
||||
narrow: /^[npusšp]/i,
|
||||
short: /^(ne|po|ut|st|št|pi|so)/i,
|
||||
abbreviated: /^(ne|po|ut|st|št|pi|so)/i,
|
||||
wide: /^(nede[ľl]a|pondelok|utorok|streda|[šs]tvrtok|piatok|sobota])/i,
|
||||
};
|
||||
const parseDayPatterns = {
|
||||
narrow: [/^n/i, /^p/i, /^u/i, /^s/i, /^š/i, /^p/i, /^s/i],
|
||||
any: [/^n/i, /^po/i, /^u/i, /^st/i, /^(št|stv)/i, /^pi/i, /^so/i],
|
||||
};
|
||||
|
||||
const matchDayPeriodPatterns = {
|
||||
narrow:
|
||||
/^(am|pm|(o )?poln\.?|(nap\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]\.?|(v n\.?|noc))/i,
|
||||
abbreviated:
|
||||
/^(am|pm|(o )?poln\.?|(napol\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]er|(v )?noci?)/i,
|
||||
any: /^(am|pm|(o )?polnoci?|(na)?poludnie|r[áa]no|popoludn(ie|í|i)|ve[čc]er|(v )?noci?)/i,
|
||||
};
|
||||
const parseDayPeriodPatterns = {
|
||||
any: {
|
||||
am: /^am/i,
|
||||
pm: /^pm/i,
|
||||
midnight: /poln/i,
|
||||
noon: /^(nap|(na)?pol(\.|u))/i,
|
||||
morning: /^r[áa]no/i,
|
||||
afternoon: /^pop/i,
|
||||
evening: /^ve[čc]/i,
|
||||
night: /^(noc|v n\.)/i,
|
||||
},
|
||||
};
|
||||
|
||||
const match = (exports.match = {
|
||||
ordinalNumber: (0, _index2.buildMatchPatternFn)({
|
||||
matchPattern: matchOrdinalNumberPattern,
|
||||
parsePattern: parseOrdinalNumberPattern,
|
||||
valueCallback: (value) => parseInt(value, 10),
|
||||
}),
|
||||
|
||||
era: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchEraPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseEraPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
quarter: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchQuarterPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseQuarterPatterns,
|
||||
defaultParseWidth: "any",
|
||||
valueCallback: (index) => index + 1,
|
||||
}),
|
||||
|
||||
month: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchMonthPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseMonthPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
day: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchDayPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseDayPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
dayPeriod: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchDayPeriodPatterns,
|
||||
defaultMatchWidth: "any",
|
||||
parsePatterns: parseDayPeriodPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
});
|
||||
135
frontend/node_modules/date-fns/locale/sk/_lib/match.mjs
generated
vendored
Normal file
135
frontend/node_modules/date-fns/locale/sk/_lib/match.mjs
generated
vendored
Normal file
@ -0,0 +1,135 @@
|
||||
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
|
||||
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
|
||||
|
||||
const matchOrdinalNumberPattern = /^(\d+)\.?/i;
|
||||
const parseOrdinalNumberPattern = /\d+/i;
|
||||
|
||||
const matchEraPatterns = {
|
||||
narrow: /^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,
|
||||
abbreviated: /^(pred Kr\.|pred n\. l\.|po Kr\.|n\. l\.)/i,
|
||||
wide: /^(pred Kristom|pred na[šs][íi]m letopo[čc]tom|po Kristovi|n[áa][šs]ho letopo[čc]tu)/i,
|
||||
};
|
||||
const parseEraPatterns = {
|
||||
any: [/^pr/i, /^(po|n)/i],
|
||||
};
|
||||
|
||||
const matchQuarterPatterns = {
|
||||
narrow: /^[1234]/i,
|
||||
abbreviated: /^q[1234]/i,
|
||||
wide: /^[1234]\. [šs]tvr[ťt]rok/i,
|
||||
};
|
||||
const parseQuarterPatterns = {
|
||||
any: [/1/i, /2/i, /3/i, /4/i],
|
||||
};
|
||||
|
||||
const matchMonthPatterns = {
|
||||
narrow: /^[jfmasond]/i,
|
||||
abbreviated: /^(jan|feb|mar|apr|m[áa]j|j[úu]n|j[úu]l|aug|sep|okt|nov|dec)/i,
|
||||
wide: /^(janu[áa]ra?|febru[áa]ra?|(marec|marca)|apr[íi]la?|m[áa]ja?|j[úu]na?|j[úu]la?|augusta?|(september|septembra)|(okt[óo]ber|okt[óo]bra)|(november|novembra)|(december|decembra))/i,
|
||||
};
|
||||
const parseMonthPatterns = {
|
||||
narrow: [
|
||||
/^j/i,
|
||||
/^f/i,
|
||||
/^m/i,
|
||||
/^a/i,
|
||||
/^m/i,
|
||||
/^j/i,
|
||||
/^j/i,
|
||||
/^a/i,
|
||||
/^s/i,
|
||||
/^o/i,
|
||||
/^n/i,
|
||||
/^d/i,
|
||||
],
|
||||
|
||||
any: [
|
||||
/^ja/i,
|
||||
/^f/i,
|
||||
/^mar/i,
|
||||
/^ap/i,
|
||||
/^m[áa]j/i,
|
||||
/^j[úu]n/i,
|
||||
/^j[úu]l/i,
|
||||
/^au/i,
|
||||
/^s/i,
|
||||
/^o/i,
|
||||
/^n/i,
|
||||
/^d/i,
|
||||
],
|
||||
};
|
||||
|
||||
const matchDayPatterns = {
|
||||
narrow: /^[npusšp]/i,
|
||||
short: /^(ne|po|ut|st|št|pi|so)/i,
|
||||
abbreviated: /^(ne|po|ut|st|št|pi|so)/i,
|
||||
wide: /^(nede[ľl]a|pondelok|utorok|streda|[šs]tvrtok|piatok|sobota])/i,
|
||||
};
|
||||
const parseDayPatterns = {
|
||||
narrow: [/^n/i, /^p/i, /^u/i, /^s/i, /^š/i, /^p/i, /^s/i],
|
||||
any: [/^n/i, /^po/i, /^u/i, /^st/i, /^(št|stv)/i, /^pi/i, /^so/i],
|
||||
};
|
||||
|
||||
const matchDayPeriodPatterns = {
|
||||
narrow:
|
||||
/^(am|pm|(o )?poln\.?|(nap\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]\.?|(v n\.?|noc))/i,
|
||||
abbreviated:
|
||||
/^(am|pm|(o )?poln\.?|(napol\.?|pol\.?)|r[áa]no|pop\.?|ve[čc]er|(v )?noci?)/i,
|
||||
any: /^(am|pm|(o )?polnoci?|(na)?poludnie|r[áa]no|popoludn(ie|í|i)|ve[čc]er|(v )?noci?)/i,
|
||||
};
|
||||
const parseDayPeriodPatterns = {
|
||||
any: {
|
||||
am: /^am/i,
|
||||
pm: /^pm/i,
|
||||
midnight: /poln/i,
|
||||
noon: /^(nap|(na)?pol(\.|u))/i,
|
||||
morning: /^r[áa]no/i,
|
||||
afternoon: /^pop/i,
|
||||
evening: /^ve[čc]/i,
|
||||
night: /^(noc|v n\.)/i,
|
||||
},
|
||||
};
|
||||
|
||||
export const match = {
|
||||
ordinalNumber: buildMatchPatternFn({
|
||||
matchPattern: matchOrdinalNumberPattern,
|
||||
parsePattern: parseOrdinalNumberPattern,
|
||||
valueCallback: (value) => parseInt(value, 10),
|
||||
}),
|
||||
|
||||
era: buildMatchFn({
|
||||
matchPatterns: matchEraPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseEraPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
quarter: buildMatchFn({
|
||||
matchPatterns: matchQuarterPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseQuarterPatterns,
|
||||
defaultParseWidth: "any",
|
||||
valueCallback: (index) => index + 1,
|
||||
}),
|
||||
|
||||
month: buildMatchFn({
|
||||
matchPatterns: matchMonthPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseMonthPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
day: buildMatchFn({
|
||||
matchPatterns: matchDayPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseDayPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
dayPeriod: buildMatchFn({
|
||||
matchPatterns: matchDayPeriodPatterns,
|
||||
defaultMatchWidth: "any",
|
||||
parsePatterns: parseDayPeriodPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user