diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-06-28 17:26:46 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-06-28 17:43:56 -0700 |
| commit | e4fa1e69e7ebfb627c7198fd1a9881e9327ec4d4 (patch) | |
| tree | 06284a538a6008eca75051399e47db4e5d50301c /node_modules/date-fns/esm/locale/pl | |
initial commit: scaffolding
Diffstat (limited to 'node_modules/date-fns/esm/locale/pl')
9 files changed, 548 insertions, 0 deletions
diff --git a/node_modules/date-fns/esm/locale/pl/_lib/formatDistance/index.js b/node_modules/date-fns/esm/locale/pl/_lib/formatDistance/index.js new file mode 100644 index 0000000..8a3d3b0 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/_lib/formatDistance/index.js @@ -0,0 +1,145 @@ +var formatDistanceLocale = { + lessThanXSeconds: { + one: { + regular: 'mniej niż sekunda', + past: 'mniej niż sekundę', + future: 'mniej niż sekundę' + }, + twoFour: 'mniej niż {{count}} sekundy', + other: 'mniej niż {{count}} sekund' + }, + xSeconds: { + one: { + regular: 'sekunda', + past: 'sekundę', + future: 'sekundę' + }, + twoFour: '{{count}} sekundy', + other: '{{count}} sekund' + }, + halfAMinute: { + one: 'pół minuty', + twoFour: 'pół minuty', + other: 'pół minuty' + }, + lessThanXMinutes: { + one: { + regular: 'mniej niż minuta', + past: 'mniej niż minutę', + future: 'mniej niż minutę' + }, + twoFour: 'mniej niż {{count}} minuty', + other: 'mniej niż {{count}} minut' + }, + xMinutes: { + one: { + regular: 'minuta', + past: 'minutę', + future: 'minutę' + }, + twoFour: '{{count}} minuty', + other: '{{count}} minut' + }, + aboutXHours: { + one: { + regular: 'około godziny', + past: 'około godziny', + future: 'około godzinę' + }, + twoFour: 'około {{count}} godziny', + other: 'około {{count}} godzin' + }, + xHours: { + one: { + regular: 'godzina', + past: 'godzinę', + future: 'godzinę' + }, + twoFour: '{{count}} godziny', + other: '{{count}} godzin' + }, + xDays: { + one: { + regular: 'dzień', + past: 'dzień', + future: '1 dzień' + }, + twoFour: '{{count}} dni', + other: '{{count}} dni' + }, + aboutXWeeks: { + one: 'około tygodnia', + twoFour: 'około {{count}} tygodni', + other: 'około {{count}} tygodni' + }, + xWeeks: { + one: 'tydzień', + twoFour: '{{count}} tygodnie', + other: '{{count}} tygodni' + }, + aboutXMonths: { + one: 'około miesiąc', + twoFour: 'około {{count}} miesiące', + other: 'około {{count}} miesięcy' + }, + xMonths: { + one: 'miesiąc', + twoFour: '{{count}} miesiące', + other: '{{count}} miesięcy' + }, + aboutXYears: { + one: 'około rok', + twoFour: 'około {{count}} lata', + other: 'około {{count}} lat' + }, + xYears: { + one: 'rok', + twoFour: '{{count}} lata', + other: '{{count}} lat' + }, + overXYears: { + one: 'ponad rok', + twoFour: 'ponad {{count}} lata', + other: 'ponad {{count}} lat' + }, + almostXYears: { + one: 'prawie rok', + twoFour: 'prawie {{count}} lata', + other: 'prawie {{count}} lat' + } +}; +function declensionGroup(scheme, count) { + if (count === 1) { + return scheme.one; + } + var rem100 = count % 100; + + // ends with 11-20 + if (rem100 <= 20 && rem100 > 10) { + return scheme.other; + } + var rem10 = rem100 % 10; + + // ends with 2, 3, 4 + if (rem10 >= 2 && rem10 <= 4) { + return scheme.twoFour; + } + return scheme.other; +} +function declension(scheme, count, time) { + var group = declensionGroup(scheme, count); + var finalText = typeof group === 'string' ? group : group[time]; + return finalText.replace('{{count}}', String(count)); +} +var formatDistance = function formatDistance(token, count, options) { + var scheme = formatDistanceLocale[token]; + if (!(options !== null && options !== void 0 && options.addSuffix)) { + return declension(scheme, count, 'regular'); + } + if (options.comparison && options.comparison > 0) { + return 'za ' + declension(scheme, count, 'future'); + } else { + return declension(scheme, count, 'past') + ' temu'; + } +}; +export default formatDistance;
\ No newline at end of file diff --git a/node_modules/date-fns/esm/locale/pl/_lib/formatLong/index.js b/node_modules/date-fns/esm/locale/pl/_lib/formatLong/index.js new file mode 100644 index 0000000..2543318 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/_lib/formatLong/index.js @@ -0,0 +1,34 @@ +import buildFormatLongFn from "../../../_lib/buildFormatLongFn/index.js"; +var dateFormats = { + full: 'EEEE, do MMMM y', + long: 'do MMMM y', + medium: 'do MMM y', + short: 'dd.MM.y' +}; +var timeFormats = { + full: 'HH:mm:ss zzzz', + long: 'HH:mm:ss z', + medium: 'HH:mm:ss', + short: 'HH:mm' +}; +var dateTimeFormats = { + full: '{{date}} {{time}}', + long: '{{date}} {{time}}', + medium: '{{date}}, {{time}}', + short: '{{date}}, {{time}}' +}; +var formatLong = { + date: buildFormatLongFn({ + formats: dateFormats, + defaultWidth: 'full' + }), + time: buildFormatLongFn({ + formats: timeFormats, + defaultWidth: 'full' + }), + dateTime: buildFormatLongFn({ + formats: dateTimeFormats, + defaultWidth: 'full' + }) +}; +export default formatLong;
\ No newline at end of file diff --git a/node_modules/date-fns/esm/locale/pl/_lib/formatRelative/index.js b/node_modules/date-fns/esm/locale/pl/_lib/formatRelative/index.js new file mode 100644 index 0000000..9da8456 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/_lib/formatRelative/index.js @@ -0,0 +1,54 @@ +import isSameUTCWeek from "../../../../_lib/isSameUTCWeek/index.js"; +var adjectivesLastWeek = { + masculine: 'ostatni', + feminine: 'ostatnia' +}; +var adjectivesThisWeek = { + masculine: 'ten', + feminine: 'ta' +}; +var adjectivesNextWeek = { + masculine: 'następny', + feminine: 'następna' +}; +var dayGrammaticalGender = { + 0: 'feminine', + 1: 'masculine', + 2: 'masculine', + 3: 'feminine', + 4: 'masculine', + 5: 'masculine', + 6: 'feminine' +}; +function dayAndTimeWithAdjective(token, date, baseDate, options) { + var adjectives; + if (isSameUTCWeek(date, baseDate, options)) { + adjectives = adjectivesThisWeek; + } else if (token === 'lastWeek') { + adjectives = adjectivesLastWeek; + } else if (token === 'nextWeek') { + adjectives = adjectivesNextWeek; + } else { + throw new Error("Cannot determine adjectives for token ".concat(token)); + } + var day = date.getUTCDay(); + var grammaticalGender = dayGrammaticalGender[day]; + var adjective = adjectives[grammaticalGender]; + return "'".concat(adjective, "' eeee 'o' p"); +} +var formatRelativeLocale = { + lastWeek: dayAndTimeWithAdjective, + yesterday: "'wczoraj o' p", + today: "'dzisiaj o' p", + tomorrow: "'jutro o' p", + nextWeek: dayAndTimeWithAdjective, + other: 'P' +}; +var formatRelative = function formatRelative(token, date, baseDate, options) { + var format = formatRelativeLocale[token]; + if (typeof format === 'function') { + return format(token, date, baseDate, options); + } + return format; +}; +export default formatRelative;
\ No newline at end of file diff --git a/node_modules/date-fns/esm/locale/pl/_lib/localize/index.js b/node_modules/date-fns/esm/locale/pl/_lib/localize/index.js new file mode 100644 index 0000000..c2496b8 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/_lib/localize/index.js @@ -0,0 +1,133 @@ +import buildLocalizeFn from "../../../_lib/buildLocalizeFn/index.js"; +var eraValues = { + narrow: ['p.n.e.', 'n.e.'], + abbreviated: ['p.n.e.', 'n.e.'], + wide: ['przed naszą erą', 'naszej ery'] +}; +var quarterValues = { + narrow: ['1', '2', '3', '4'], + abbreviated: ['I kw.', 'II kw.', 'III kw.', 'IV kw.'], + wide: ['I kwartał', 'II kwartał', 'III kwartał', 'IV kwartał'] +}; +var monthValues = { + narrow: ['S', 'L', 'M', 'K', 'M', 'C', 'L', 'S', 'W', 'P', 'L', 'G'], + abbreviated: ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'], + wide: ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'] +}; +var monthFormattingValues = { + narrow: ['s', 'l', 'm', 'k', 'm', 'c', 'l', 's', 'w', 'p', 'l', 'g'], + abbreviated: ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'], + wide: ['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia'] +}; +var dayValues = { + narrow: ['N', 'P', 'W', 'Ś', 'C', 'P', 'S'], + short: ['nie', 'pon', 'wto', 'śro', 'czw', 'pią', 'sob'], + abbreviated: ['niedz.', 'pon.', 'wt.', 'śr.', 'czw.', 'pt.', 'sob.'], + wide: ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'] +}; +var dayFormattingValues = { + narrow: ['n', 'p', 'w', 'ś', 'c', 'p', 's'], + short: ['nie', 'pon', 'wto', 'śro', 'czw', 'pią', 'sob'], + abbreviated: ['niedz.', 'pon.', 'wt.', 'śr.', 'czw.', 'pt.', 'sob.'], + wide: ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'] +}; +var dayPeriodValues = { + narrow: { + am: 'a', + pm: 'p', + midnight: 'półn.', + noon: 'poł', + morning: 'rano', + afternoon: 'popoł.', + evening: 'wiecz.', + night: 'noc' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'północ', + noon: 'południe', + morning: 'rano', + afternoon: 'popołudnie', + evening: 'wieczór', + night: 'noc' + }, + wide: { + am: 'AM', + pm: 'PM', + midnight: 'północ', + noon: 'południe', + morning: 'rano', + afternoon: 'popołudnie', + evening: 'wieczór', + night: 'noc' + } +}; +var dayPeriodFormattingValues = { + narrow: { + am: 'a', + pm: 'p', + midnight: 'o półn.', + noon: 'w poł.', + morning: 'rano', + afternoon: 'po poł.', + evening: 'wiecz.', + night: 'w nocy' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'o północy', + noon: 'w południe', + morning: 'rano', + afternoon: 'po południu', + evening: 'wieczorem', + night: 'w nocy' + }, + wide: { + am: 'AM', + pm: 'PM', + midnight: 'o północy', + noon: 'w południe', + morning: 'rano', + afternoon: 'po południu', + evening: 'wieczorem', + night: 'w nocy' + } +}; +var ordinalNumber = function ordinalNumber(dirtyNumber, _options) { + return String(dirtyNumber); +}; +var localize = { + ordinalNumber: ordinalNumber, + era: buildLocalizeFn({ + values: eraValues, + defaultWidth: 'wide' + }), + quarter: buildLocalizeFn({ + values: quarterValues, + defaultWidth: 'wide', + argumentCallback: function argumentCallback(quarter) { + return quarter - 1; + } + }), + month: buildLocalizeFn({ + values: monthValues, + defaultWidth: 'wide', + formattingValues: monthFormattingValues, + defaultFormattingWidth: 'wide' + }), + day: buildLocalizeFn({ + values: dayValues, + defaultWidth: 'wide', + formattingValues: dayFormattingValues, + defaultFormattingWidth: 'wide' + }), + dayPeriod: buildLocalizeFn({ + values: dayPeriodValues, + defaultWidth: 'wide', + formattingValues: dayPeriodFormattingValues, + defaultFormattingWidth: 'wide' + }) +}; +export default localize;
\ No newline at end of file diff --git a/node_modules/date-fns/esm/locale/pl/_lib/match/index.js b/node_modules/date-fns/esm/locale/pl/_lib/match/index.js new file mode 100644 index 0000000..bd09061 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/_lib/match/index.js @@ -0,0 +1,110 @@ +import buildMatchFn from "../../../_lib/buildMatchFn/index.js"; +import buildMatchPatternFn from "../../../_lib/buildMatchPatternFn/index.js"; +var matchOrdinalNumberPattern = /^(\d+)?/i; +var parseOrdinalNumberPattern = /\d+/i; +var matchEraPatterns = { + narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i, + abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i, + wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i +}; +var parseEraPatterns = { + any: [/^p/i, /^n/i] +}; +var matchQuarterPatterns = { + narrow: /^[1234]/i, + abbreviated: /^(I|II|III|IV)\s*kw\.?/i, + wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i +}; +var parseQuarterPatterns = { + narrow: [/1/i, /2/i, /3/i, /4/i], + any: [/^I kw/i, /^II kw/i, /^III kw/i, /^IV kw/i] +}; +var matchMonthPatterns = { + narrow: /^[slmkcwpg]/i, + abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i, + wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i +}; +var parseMonthPatterns = { + narrow: [/^s/i, /^l/i, /^m/i, /^k/i, /^m/i, /^c/i, /^l/i, /^s/i, /^w/i, /^p/i, /^l/i, /^g/i], + any: [/^st/i, /^lu/i, /^mar/i, /^k/i, /^maj/i, /^c/i, /^lip/i, /^si/i, /^w/i, /^p/i, /^lis/i, /^g/i] +}; +var matchDayPatterns = { + narrow: /^[npwścs]/i, + short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i, + abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i, + wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i +}; +var parseDayPatterns = { + narrow: [/^n/i, /^p/i, /^w/i, /^ś/i, /^c/i, /^p/i, /^s/i], + abbreviated: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pt/i, /^so/i], + any: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pi/i, /^so/i] +}; +var matchDayPeriodPatterns = { + narrow: /^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i, + any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i +}; +var parseDayPeriodPatterns = { + narrow: { + am: /^a$/i, + pm: /^p$/i, + midnight: /pó(ł|l)n/i, + noon: /po(ł|l)/i, + morning: /rano/i, + afternoon: /po\s*po(ł|l)/i, + evening: /wiecz/i, + night: /noc/i + }, + any: { + am: /^am/i, + pm: /^pm/i, + midnight: /pó(ł|l)n/i, + noon: /po(ł|l)/i, + morning: /rano/i, + afternoon: /po\s*po(ł|l)/i, + evening: /wiecz/i, + night: /noc/i + } +}; +var match = { + ordinalNumber: buildMatchPatternFn({ + matchPattern: matchOrdinalNumberPattern, + parsePattern: parseOrdinalNumberPattern, + valueCallback: function valueCallback(value) { + return parseInt(value, 10); + } + }), + era: buildMatchFn({ + matchPatterns: matchEraPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseEraPatterns, + defaultParseWidth: 'any' + }), + quarter: buildMatchFn({ + matchPatterns: matchQuarterPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseQuarterPatterns, + defaultParseWidth: 'any', + valueCallback: function valueCallback(index) { + return 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' + }) +}; +export default match;
\ No newline at end of file diff --git a/node_modules/date-fns/esm/locale/pl/index.d.ts b/node_modules/date-fns/esm/locale/pl/index.d.ts new file mode 100644 index 0000000..1ff8b7d --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/index.d.ts @@ -0,0 +1,4 @@ +// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. + +import { pl } from 'date-fns/locale' +export default pl diff --git a/node_modules/date-fns/esm/locale/pl/index.js b/node_modules/date-fns/esm/locale/pl/index.js new file mode 100644 index 0000000..56a1208 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/index.js @@ -0,0 +1,29 @@ +import formatDistance from "./_lib/formatDistance/index.js"; +import formatLong from "./_lib/formatLong/index.js"; +import formatRelative from "./_lib/formatRelative/index.js"; +import localize from "./_lib/localize/index.js"; +import match from "./_lib/match/index.js"; +/** + * @type {Locale} + * @category Locales + * @summary Polish locale. + * @language Polish + * @iso-639-2 pol + * @author Mateusz Derks [@ertrzyiks]{@link https://github.com/ertrzyiks} + * @author Just RAG [@justrag]{@link https://github.com/justrag} + * @author Mikolaj Grzyb [@mikolajgrzyb]{@link https://github.com/mikolajgrzyb} + * @author Mateusz Tokarski [@mutisz]{@link https://github.com/mutisz} + */ +var locale = { + code: 'pl', + formatDistance: formatDistance, + formatLong: formatLong, + formatRelative: formatRelative, + localize: localize, + match: match, + options: { + weekStartsOn: 1 /* Monday */, + firstWeekContainsDate: 4 + } +}; +export default locale;
\ No newline at end of file diff --git a/node_modules/date-fns/esm/locale/pl/index.js.flow b/node_modules/date-fns/esm/locale/pl/index.js.flow new file mode 100644 index 0000000..b9dfe66 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/index.js.flow @@ -0,0 +1,35 @@ +// @flow +// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. + +export type Locale = { + code?: string, + formatDistance?: (...args: Array<any>) => any, + formatRelative?: (...args: Array<any>) => any, + localize?: { + ordinalNumber: (...args: Array<any>) => any, + era: (...args: Array<any>) => any, + quarter: (...args: Array<any>) => any, + month: (...args: Array<any>) => any, + day: (...args: Array<any>) => any, + dayPeriod: (...args: Array<any>) => any, + }, + formatLong?: { + date: (...args: Array<any>) => any, + time: (...args: Array<any>) => any, + dateTime: (...args: Array<any>) => any, + }, + match?: { + ordinalNumber: (...args: Array<any>) => any, + era: (...args: Array<any>) => any, + quarter: (...args: Array<any>) => any, + month: (...args: Array<any>) => any, + day: (...args: Array<any>) => any, + dayPeriod: (...args: Array<any>) => any, + }, + options?: { + weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6, + firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7, + }, +} + +declare module.exports: Locale diff --git a/node_modules/date-fns/esm/locale/pl/package.json b/node_modules/date-fns/esm/locale/pl/package.json new file mode 100644 index 0000000..a7398d8 --- /dev/null +++ b/node_modules/date-fns/esm/locale/pl/package.json @@ -0,0 +1,4 @@ +{ + "sideEffects": false, + "typings": "../../../typings.d.ts" +}
\ No newline at end of file |
