deno.land / x / dayjs@v1.11.5 / src / locale / pl.js

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Polish [pl]import dayjs from 'dayjs'
function plural(n) { return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1) // eslint-disable-line}/* eslint-disable */ function translate(number, withoutSuffix, key) { const result = `${number} ` switch (key) { case 'm': return withoutSuffix ? 'minuta' : 'minutę' case 'mm': return result + (plural(number) ? 'minuty' : 'minut') case 'h': return withoutSuffix ? 'godzina' : 'godzinę' case 'hh': return result + (plural(number) ? 'godziny' : 'godzin') case 'MM': return result + (plural(number) ? 'miesiące' : 'miesięcy') case 'yy': return result + (plural(number) ? 'lata' : 'lat') }}/* eslint-enable */
const monthFormat = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_')const monthStandalone = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_')const MONTHS_IN_FORMAT = /D MMMM/
const months = (dayjsInstance, format) => { if (MONTHS_IN_FORMAT.test(format)) { return monthFormat[dayjsInstance.month()] } return monthStandalone[dayjsInstance.month()]}months.s = monthStandalonemonths.f = monthFormat
const locale = { name: 'pl', weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), months, monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), ordinal: n => `${n}.`, weekStart: 1, yearStart: 4, relativeTime: { future: 'za %s', past: '%s temu', s: 'kilka sekund', m: translate, mm: translate, h: translate, hh: translate, d: '1 dzień', dd: '%d dni', M: 'miesiąc', MM: translate, y: 'rok', yy: translate }, formats: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD.MM.YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY HH:mm', LLLL: 'dddd, D MMMM YYYY HH:mm' }}
dayjs.locale(locale, null, true)
export default locale
dayjs

Version Info

Tagged at
a year ago