main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

105
node_modules/date-fns/locale/ckb/_lib/formatDistance.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "کەمتر لە یەک چرکە",
other: "کەمتر لە {{count}} چرکە",
},
xSeconds: {
one: "1 چرکە",
other: "{{count}} چرکە",
},
halfAMinute: "نیو کاتژمێر",
lessThanXMinutes: {
one: "کەمتر لە یەک خولەک",
other: "کەمتر لە {{count}} خولەک",
},
xMinutes: {
one: "1 خولەک",
other: "{{count}} خولەک",
},
aboutXHours: {
one: "دەوروبەری 1 کاتژمێر",
other: "دەوروبەری {{count}} کاتژمێر",
},
xHours: {
one: "1 کاتژمێر",
other: "{{count}} کاتژمێر",
},
xDays: {
one: "1 ڕۆژ",
other: "{{count}} ژۆژ",
},
aboutXWeeks: {
one: "دەوروبەری 1 هەفتە",
other: "دوروبەری {{count}} هەفتە",
},
xWeeks: {
one: "1 هەفتە",
other: "{{count}} هەفتە",
},
aboutXMonths: {
one: "داوروبەری 1 مانگ",
other: "دەوروبەری {{count}} مانگ",
},
xMonths: {
one: "1 مانگ",
other: "{{count}} مانگ",
},
aboutXYears: {
one: "دەوروبەری 1 ساڵ",
other: "دەوروبەری {{count}} ساڵ",
},
xYears: {
one: "1 ساڵ",
other: "{{count}} ساڵ",
},
overXYears: {
one: "زیاتر لە ساڵێک",
other: "زیاتر لە {{count}} ساڵ",
},
almostXYears: {
one: "بەنزیکەیی ساڵێک ",
other: "بەنزیکەیی {{count}} ساڵ",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "لە ماوەی " + result + "دا";
} else {
return result + "پێش ئێستا";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,101 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "کەمتر لە یەک چرکە",
other: "کەمتر لە {{count}} چرکە",
},
xSeconds: {
one: "1 چرکە",
other: "{{count}} چرکە",
},
halfAMinute: "نیو کاتژمێر",
lessThanXMinutes: {
one: "کەمتر لە یەک خولەک",
other: "کەمتر لە {{count}} خولەک",
},
xMinutes: {
one: "1 خولەک",
other: "{{count}} خولەک",
},
aboutXHours: {
one: "دەوروبەری 1 کاتژمێر",
other: "دەوروبەری {{count}} کاتژمێر",
},
xHours: {
one: "1 کاتژمێر",
other: "{{count}} کاتژمێر",
},
xDays: {
one: "1 ڕۆژ",
other: "{{count}} ژۆژ",
},
aboutXWeeks: {
one: "دەوروبەری 1 هەفتە",
other: "دوروبەری {{count}} هەفتە",
},
xWeeks: {
one: "1 هەفتە",
other: "{{count}} هەفتە",
},
aboutXMonths: {
one: "داوروبەری 1 مانگ",
other: "دەوروبەری {{count}} مانگ",
},
xMonths: {
one: "1 مانگ",
other: "{{count}} مانگ",
},
aboutXYears: {
one: "دەوروبەری 1 ساڵ",
other: "دەوروبەری {{count}} ساڵ",
},
xYears: {
one: "1 ساڵ",
other: "{{count}} ساڵ",
},
overXYears: {
one: "زیاتر لە ساڵێک",
other: "زیاتر لە {{count}} ساڵ",
},
almostXYears: {
one: "بەنزیکەیی ساڵێک ",
other: "بەنزیکەیی {{count}} ساڵ",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "لە ماوەی " + result + "دا";
} else {
return result + "پێش ئێستا";
}
}
return result;
};

View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

41
node_modules/date-fns/locale/ckb/_lib/formatLong.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
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",
}),
});

39
node_modules/date-fns/locale/ckb/_lib/formatLong.mjs generated vendored Normal file
View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
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",
}),
};

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "'هەفتەی ڕابردوو' eeee 'کاتژمێر' p",
yesterday: "'دوێنێ کاتژمێر' p",
today: "'ئەمڕۆ کاتژمێر' p",
tomorrow: "'بەیانی کاتژمێر' p",
nextWeek: "eeee 'کاتژمێر' p",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "'هەفتەی ڕابردوو' eeee 'کاتژمێر' p",
yesterday: "'دوێنێ کاتژمێر' p",
today: "'ئەمڕۆ کاتژمێر' p",
tomorrow: "'بەیانی کاتژمێر' p",
nextWeek: "eeee 'کاتژمێر' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

2
node_modules/date-fns/locale/ckb/_lib/localize.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

2
node_modules/date-fns/locale/ckb/_lib/localize.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

193
node_modules/date-fns/locale/ckb/_lib/localize.js generated vendored Normal file
View File

@@ -0,0 +1,193 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["پ", "د"],
abbreviated: ["پ-ز", "د-ز"],
wide: ["پێش زاین", "دوای زاین"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["چ1م", "چ2م", "چ3م", "چ4م"],
wide: ["چارەگی یەکەم", "چارەگی دووەم", "چارەگی سێیەم", "چارەگی چوارەم"],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: [
"ک-د",
"ش",
"ئا",
"ن",
"م",
"ح",
"ت",
"ئا",
"ئە",
"تش-ی",
"تش-د",
"ک-ی",
],
abbreviated: [
"کان-دوو",
"شوب",
"ئاد",
"نیس",
"مایس",
"حوز",
"تەم",
"ئاب",
"ئەل",
"تش-یەک",
"تش-دوو",
"کان-یەک",
],
wide: [
"کانوونی دووەم",
"شوبات",
"ئادار",
"نیسان",
"مایس",
"حوزەیران",
"تەمموز",
"ئاب",
"ئەیلول",
"تشرینی یەکەم",
"تشرینی دووەم",
"کانوونی یەکەم",
],
};
const dayValues = {
narrow: ["ی-ش", "د-ش", "س-ش", "چ-ش", "پ-ش", "هە", "ش"],
short: ["یە-شە", "دوو-شە", "سێ-شە", "چو-شە", "پێ-شە", "هەی", "شە"],
abbreviated: [
"یەک-شەم",
"دوو-شەم",
"سێ-شەم",
"چوار-شەم",
"پێنج-شەم",
"هەینی",
"شەمە",
],
wide: [
"یەک شەمە",
"دوو شەمە",
"سێ شەمە",
"چوار شەمە",
"پێنج شەمە",
"هەینی",
"شەمە",
],
};
const dayPeriodValues = {
narrow: {
am: "پ",
pm: "د",
midnight: "ن-ش",
noon: "ن",
morning: "بەیانی",
afternoon: "دوای نیوەڕۆ",
evening: "ئێوارە",
night: "شەو",
},
abbreviated: {
am: "پ-ن",
pm: "د-ن",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "بەیانی",
afternoon: "دوای نیوەڕۆ",
evening: "ئێوارە",
night: "شەو",
},
wide: {
am: "پێش نیوەڕۆ",
pm: "دوای نیوەڕۆ",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "بەیانی",
afternoon: "دوای نیوەڕۆ",
evening: "ئێوارە",
night: "شەو",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "پ",
pm: "د",
midnight: "ن-ش",
noon: "ن",
morning: "لە بەیانیدا",
afternoon: "لە دوای نیوەڕۆدا",
evening: "لە ئێوارەدا",
night: "لە شەودا",
},
abbreviated: {
am: "پ-ن",
pm: "د-ن",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "لە بەیانیدا",
afternoon: "لە دوای نیوەڕۆدا",
evening: "لە ئێوارەدا",
night: "لە شەودا",
},
wide: {
am: "پێش نیوەڕۆ",
pm: "دوای نیوەڕۆ",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "لە بەیانیدا",
afternoon: "لە دوای نیوەڕۆدا",
evening: "لە ئێوارەدا",
night: "لە شەودا",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
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",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

190
node_modules/date-fns/locale/ckb/_lib/localize.mjs generated vendored Normal file
View File

@@ -0,0 +1,190 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["پ", "د"],
abbreviated: ["پ-ز", "د-ز"],
wide: ["پێش زاین", "دوای زاین"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["چ1م", "چ2م", "چ3م", "چ4م"],
wide: ["چارەگی یەکەم", "چارەگی دووەم", "چارەگی سێیەم", "چارەگی چوارەم"],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: [
"ک-د",
"ش",
"ئا",
"ن",
"م",
"ح",
"ت",
"ئا",
"ئە",
"تش-ی",
"تش-د",
"ک-ی",
],
abbreviated: [
"کان-دوو",
"شوب",
"ئاد",
"نیس",
"مایس",
"حوز",
"تەم",
"ئاب",
"ئەل",
"تش-یەک",
"تش-دوو",
"کان-یەک",
],
wide: [
"کانوونی دووەم",
"شوبات",
"ئادار",
"نیسان",
"مایس",
"حوزەیران",
"تەمموز",
"ئاب",
"ئەیلول",
"تشرینی یەکەم",
"تشرینی دووەم",
"کانوونی یەکەم",
],
};
const dayValues = {
narrow: ["ی-ش", "د-ش", "س-ش", "چ-ش", "پ-ش", "هە", "ش"],
short: ["یە-شە", "دوو-شە", "سێ-شە", "چو-شە", "پێ-شە", "هەی", "شە"],
abbreviated: [
"یەک-شەم",
"دوو-شەم",
"سێ-شەم",
"چوار-شەم",
"پێنج-شەم",
"هەینی",
"شەمە",
],
wide: [
"یەک شەمە",
"دوو شەمە",
"سێ شەمە",
"چوار شەمە",
"پێنج شەمە",
"هەینی",
"شەمە",
],
};
const dayPeriodValues = {
narrow: {
am: "پ",
pm: "د",
midnight: "ن-ش",
noon: "ن",
morning: "بەیانی",
afternoon: "دوای نیوەڕۆ",
evening: "ئێوارە",
night: "شەو",
},
abbreviated: {
am: "پ-ن",
pm: "د-ن",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "بەیانی",
afternoon: "دوای نیوەڕۆ",
evening: "ئێوارە",
night: "شەو",
},
wide: {
am: "پێش نیوەڕۆ",
pm: "دوای نیوەڕۆ",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "بەیانی",
afternoon: "دوای نیوەڕۆ",
evening: "ئێوارە",
night: "شەو",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "پ",
pm: "د",
midnight: "ن-ش",
noon: "ن",
morning: "لە بەیانیدا",
afternoon: "لە دوای نیوەڕۆدا",
evening: "لە ئێوارەدا",
night: "لە شەودا",
},
abbreviated: {
am: "پ-ن",
pm: "د-ن",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "لە بەیانیدا",
afternoon: "لە دوای نیوەڕۆدا",
evening: "لە ئێوارەدا",
night: "لە شەودا",
},
wide: {
am: "پێش نیوەڕۆ",
pm: "دوای نیوەڕۆ",
midnight: "نیوە شەو",
noon: "نیوەڕۆ",
morning: "لە بەیانیدا",
afternoon: "لە دوای نیوەڕۆدا",
evening: "لە ئێوارەدا",
night: "لە شەودا",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
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",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

2
node_modules/date-fns/locale/ckb/_lib/match.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

2
node_modules/date-fns/locale/ckb/_lib/match.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

140
node_modules/date-fns/locale/ckb/_lib/match.js generated vendored Normal file
View File

@@ -0,0 +1,140 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(پ|د)/i,
abbreviated: /^(پ-ز|د.ز)/i,
wide: /^(پێش زاین| دوای زاین)/i,
};
const parseEraPatterns = {
any: [/^د/g, /^پ/g],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^م[1234]چ/i,
wide: /^(یەکەم|دووەم|سێیەم| چوارەم) (چارەگی)? quarter/i,
};
const parseQuarterPatterns = {
wide: [/چارەگی یەکەم/, /چارەگی دووەم/, /چارەگی سيیەم/, /چارەگی چوارەم/],
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(ک-د|ش|ئا|ن|م|ح|ت|ئە|تش-ی|تش-د|ک-ی)/i,
abbreviated:
/^(کان-دوو|شوب|ئاد|نیس|مایس|حوز|تەم|ئاب|ئەل|تش-یەک|تش-دوو|کان-یەک)/i,
wide: /^(کانوونی دووەم|شوبات|ئادار|نیسان|مایس|حوزەیران|تەمموز|ئاب|ئەیلول|تشرینی یەکەم|تشرینی دووەم|کانوونی یەکەم)/i,
};
const parseMonthPatterns = {
narrow: [
/^ک-د/i,
/^ش/i,
/^ئا/i,
/^ن/i,
/^م/i,
/^ح/i,
/^ت/i,
/^ئا/i,
/^ئە/i,
/^تش-ی/i,
/^تش-د/i,
/^ک-ی/i,
],
any: [
/^کان-دوو/i,
/^شوب/i,
/^ئاد/i,
/^نیس/i,
/^مایس/i,
/^حوز/i,
/^تەم/i,
/^ئاب/i,
/^ئەل/i,
/^تش-یەک/i,
/^تش-دوو/i,
/^|کان-یەک/i,
],
};
const matchDayPatterns = {
narrow: /^(ش|ی|د|س|چ|پ|هە)/i,
short: /^(یە-شە|دوو-شە|سێ-شە|چو-شە|پێ-شە|هە|شە)/i,
abbreviated: /^(یەک-شەم|دوو-شەم|سێ-شەم|چوار-شەم|پێنخ-شەم|هەینی|شەمە)/i,
wide: /^(یەک شەمە|دوو شەمە|سێ شەمە|چوار شەمە|پێنج شەمە|هەینی|شەمە)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(پ|د|ن-ش|ن| (بەیانی|دوای نیوەڕۆ|ئێوارە|شەو))/i,
abbreviated: /^(پ-ن|د-ن|نیوە شەو|نیوەڕۆ|بەیانی|دوای نیوەڕۆ|ئێوارە|شەو)/,
wide: /^(پێش نیوەڕۆ|دوای نیوەڕۆ|نیوەڕۆ|نیوە شەو|لەبەیانیدا|لەدواینیوەڕۆدا|لە ئێوارەدا|لە شەودا)/,
any: /^(پ|د|بەیانی|نیوەڕۆ|ئێوارە|شەو)/,
};
const parseDayPeriodPatterns = {
any: {
am: /^د/i,
pm: /^پ/i,
midnight: /^ن-ش/i,
noon: /^ن/i,
morning: /بەیانی/i,
afternoon: /دواینیوەڕۆ/i,
evening: /ئێوارە/i,
night: /شەو/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",
}),
});

137
node_modules/date-fns/locale/ckb/_lib/match.mjs generated vendored Normal file
View File

@@ -0,0 +1,137 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(پ|د)/i,
abbreviated: /^(پ-ز|د.ز)/i,
wide: /^(پێش زاین| دوای زاین)/i,
};
const parseEraPatterns = {
any: [/^د/g, /^پ/g],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^م[1234]چ/i,
wide: /^(یەکەم|دووەم|سێیەم| چوارەم) (چارەگی)? quarter/i,
};
const parseQuarterPatterns = {
wide: [/چارەگی یەکەم/, /چارەگی دووەم/, /چارەگی سيیەم/, /چارەگی چوارەم/],
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(ک-د|ش|ئا|ن|م|ح|ت|ئە|تش-ی|تش-د|ک-ی)/i,
abbreviated:
/^(کان-دوو|شوب|ئاد|نیس|مایس|حوز|تەم|ئاب|ئەل|تش-یەک|تش-دوو|کان-یەک)/i,
wide: /^(کانوونی دووەم|شوبات|ئادار|نیسان|مایس|حوزەیران|تەمموز|ئاب|ئەیلول|تشرینی یەکەم|تشرینی دووەم|کانوونی یەکەم)/i,
};
const parseMonthPatterns = {
narrow: [
/^ک-د/i,
/^ش/i,
/^ئا/i,
/^ن/i,
/^م/i,
/^ح/i,
/^ت/i,
/^ئا/i,
/^ئە/i,
/^تش-ی/i,
/^تش-د/i,
/^ک-ی/i,
],
any: [
/^کان-دوو/i,
/^شوب/i,
/^ئاد/i,
/^نیس/i,
/^مایس/i,
/^حوز/i,
/^تەم/i,
/^ئاب/i,
/^ئەل/i,
/^تش-یەک/i,
/^تش-دوو/i,
/^|کان-یەک/i,
],
};
const matchDayPatterns = {
narrow: /^(ش|ی|د|س|چ|پ|هە)/i,
short: /^(یە-شە|دوو-شە|سێ-شە|چو-شە|پێ-شە|هە|شە)/i,
abbreviated: /^(یەک-شەم|دوو-شەم|سێ-شەم|چوار-شەم|پێنخ-شەم|هەینی|شەمە)/i,
wide: /^(یەک شەمە|دوو شەمە|سێ شەمە|چوار شەمە|پێنج شەمە|هەینی|شەمە)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(پ|د|ن-ش|ن| (بەیانی|دوای نیوەڕۆ|ئێوارە|شەو))/i,
abbreviated: /^(پ-ن|د-ن|نیوە شەو|نیوەڕۆ|بەیانی|دوای نیوەڕۆ|ئێوارە|شەو)/,
wide: /^(پێش نیوەڕۆ|دوای نیوەڕۆ|نیوەڕۆ|نیوە شەو|لەبەیانیدا|لەدواینیوەڕۆدا|لە ئێوارەدا|لە شەودا)/,
any: /^(پ|د|بەیانی|نیوەڕۆ|ئێوارە|شەو)/,
};
const parseDayPeriodPatterns = {
any: {
am: /^د/i,
pm: /^پ/i,
midnight: /^ن-ش/i,
noon: /^ن/i,
morning: /بەیانی/i,
afternoon: /دواینیوەڕۆ/i,
evening: /ئێوارە/i,
night: /شەو/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",
}),
};