Skip to content

Commit 07f7cb3

Browse files
committed
[verified] fix: correct Gujarati weekday indexing
1 parent 49921e5 commit 07f7cb3

2 files changed

Lines changed: 35 additions & 28 deletions

File tree

src/pendulum/locales/gu/locale.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,40 @@
1414
'translations': {
1515
'days': {
1616
'abbreviated': {
17-
0: 'રવિ',
18-
1: 'સોમ',
19-
2: 'મંગળ',
20-
3: 'બુધ',
21-
4: 'ગુરુ',
22-
5: 'શુક્ર',
23-
6: 'શનિ',
17+
0: 'સોમ',
18+
1: 'મંગળ',
19+
2: 'બુધ',
20+
3: 'ગુરુ',
21+
4: 'શુક્ર',
22+
5: 'શનિ',
23+
6: 'રવિ',
2424
},
2525
'narrow': {
26-
0: '',
27-
1: 'સો',
28-
2: 'મં',
29-
3: 'બુ',
30-
4: 'ગુ',
31-
5: 'શુ',
32-
6: '',
26+
0: 'સો',
27+
1: 'મં',
28+
2: 'બુ',
29+
3: 'ગુ',
30+
4: 'શુ',
31+
5: '',
32+
6: '',
3333
},
3434
'short': {
35-
0: '',
36-
1: 'સો',
37-
2: 'મં',
38-
3: 'બુ',
39-
4: 'ગુ',
40-
5: 'શુ',
41-
6: '',
35+
0: 'સો',
36+
1: 'મં',
37+
2: 'બુ',
38+
3: 'ગુ',
39+
4: 'શુ',
40+
5: '',
41+
6: '',
4242
},
4343
'wide': {
44-
0: 'રવિવાર',
45-
1: 'સોમવાર',
46-
2: 'મંગળવાર',
47-
3: 'બુધવાર',
48-
4: 'ગુરુવાર',
49-
5: 'શુક્રવાર',
50-
6: 'શનિવાર',
44+
0: 'સોમવાર',
45+
1: 'મંગળવાર',
46+
2: 'બુધવાર',
47+
3: 'ગુરુવાર',
48+
4: 'શુક્રવાર',
49+
5: 'શનિવાર',
50+
6: 'રવિવાર',
5151
},
5252
},
5353
'months': {

tests/localization/test_gu.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,10 @@ def diff_for_humans():
6767

6868
assert d.diff_for_humans(d2, True, locale=locale) == "અમુક સેકંડ"
6969
assert d2.diff_for_humans(d.add(seconds=1), True, locale=locale) == "અમુક સેકંડ"
70+
71+
72+
def test_format():
73+
d = pendulum.datetime(2016, 8, 29, 7, 3, 6, 123456)
74+
assert d.format("dddd", locale=locale) == "સોમવાર"
75+
assert d.format("ddd", locale=locale) == "સોમ"
76+
assert d.format("dd", locale=locale) == "સો"

0 commit comments

Comments
 (0)