nepali 1.1.0__py3-none-any.whl → 1.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of nepali might be problematic. Click here for more details.

nepali/date_converter.py CHANGED
@@ -78,7 +78,7 @@ class NepaliDateConverter:
78
78
  ((31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30), 365),
79
79
  ((31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30), 365),
80
80
  ((31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30), 365),
81
- ((31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31), 366),
81
+ ((31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31), 366), # 2050
82
82
  ((31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30), 365),
83
83
  ((31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30), 365),
84
84
  ((31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30), 365),
@@ -98,7 +98,7 @@ class NepaliDateConverter:
98
98
  ((31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30), 365),
99
99
  ((31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30), 365),
100
100
  ((31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31), 366),
101
- ((31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30), 365),
101
+ ((31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30), 365), # 2070
102
102
  ((31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30), 365),
103
103
  ((31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30), 365),
104
104
  ((31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31), 366),
@@ -108,8 +108,8 @@ class NepaliDateConverter:
108
108
  ((31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31), 366),
109
109
  ((31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30), 365),
110
110
  ((31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30), 365),
111
- ((31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30), 365),
112
- ((31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30), 366),
111
+ ((31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30), 365), # 2080
112
+ ((31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31), 366),
113
113
  ((30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30), 365),
114
114
  ((31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30), 365),
115
115
  ((31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30), 365),
@@ -9,6 +9,7 @@ from nepali.date_converter import converter
9
9
 
10
10
 
11
11
  class TestNepaliDateConverter(unittest.TestCase):
12
+ """tests for date_converter.converter module"""
12
13
  # test date range
13
14
  def test_english_date_range(self):
14
15
  self.assertEqual(converter.en_min_year(), 1944)
@@ -49,6 +50,12 @@ class TestNepaliDateConverter(unittest.TestCase):
49
50
  self.assertEqual(m, 4)
50
51
  self.assertEqual(d, 29)
51
52
 
53
+ def test_converter_english_to_nepali_returns_valid_past_nepali_date2(self):
54
+ y, m, d = converter.english_to_nepali(1944, 5, 28)
55
+ self.assertEqual(y, 2001)
56
+ self.assertEqual(m, 2)
57
+ self.assertEqual(d, 15)
58
+
52
59
  def test_converter_english_to_nepali_returns_valid_recent_nepali_date(self):
53
60
  y, m, d = converter.english_to_nepali(2023, 1, 28)
54
61
  self.assertEqual(y, 2079)
@@ -98,25 +105,31 @@ class TestNepaliDateConverter(unittest.TestCase):
98
105
  with self.assertRaises(Exception):
99
106
  converter.nepali_to_english(2079, 1, 40)
100
107
 
101
- def test_converter_nepali_to_englishReturnsValidPastEnglishDate(self):
108
+ def test_converter_nepali_to_english_returns_valid_past_english_date(self):
102
109
  y, m, d = converter.nepali_to_english(2051, 4, 29)
103
110
  self.assertEqual(y, 1994)
104
111
  self.assertEqual(m, 8)
105
112
  self.assertEqual(d, 13)
106
113
 
107
- def test_converter_nepali_to_englishReturnsValidRecentEnglishDate(self):
114
+ def test_converter_nepali_to_english_returns_valid_past_english_date2(self):
115
+ y, m, d = converter.nepali_to_english(2001, 2, 15)
116
+ self.assertEqual(y, 1944)
117
+ self.assertEqual(m, 5)
118
+ self.assertEqual(d, 28)
119
+
120
+ def test_converter_nepali_to_english_returns_valid_recent_english_date(self):
108
121
  y, m, d = converter.nepali_to_english(2079, 10, 14)
109
122
  self.assertEqual(y, 2023)
110
123
  self.assertEqual(m, 1)
111
124
  self.assertEqual(d, 28)
112
125
 
113
- def test_converter_nepali_to_englishReturnsValidFutureEnglishDate(self):
126
+ def test_converter_nepali_to_english_returns_valid_future_english_date(self):
114
127
  y, m, d = converter.nepali_to_english(2087, 8, 10)
115
128
  self.assertEqual(y, 2030)
116
129
  self.assertEqual(m, 11)
117
130
  self.assertEqual(d, 26)
118
131
 
119
- def test_converter_nepali_to_englishReturnsValidEnglishLeapYearDate(self):
132
+ def test_converter_nepali_to_english_returns_valid_english_leap_year_date(self):
120
133
  y, m, d = converter.nepali_to_english(2080, 12, 15)
121
134
  self.assertEqual(y, 2024)
122
135
  self.assertEqual(m, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nepali
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: nepalidatetime compatible with python's datetime feature. Converting nepali date to english, parsing nepali datetime, nepali timezone, and timedelta support in nepali datetime
5
5
  Home-page: https://github.com/opensource-nepal/py-nepali
6
6
  Author: opensource-nepal
@@ -310,7 +310,7 @@ np_datetime = parse("Jestha 15, 2079") # 2079-02-15 00:00:00
310
310
 
311
311
  | Directive | Meaning | Example |
312
312
  | --------- | --------------------------------------------------------- | ------------------------------ |
313
- | `%A` | Weekday as locale’s abbreviated name. | Sun, Mon, …, Sat (आइत, सोम, …) |
313
+ | `%a` | Weekday as locale’s abbreviated name. | Sun, Mon, …, Sat (आइत, सोम, …) |
314
314
  | `%A` | Weekday as locale’s full name. | Sunday, Monday, …, Saturday |
315
315
  | `%d` | Day of the month as a zero-padded decimal number. | 01, 02, …, 31 |
316
316
  | `%-d` | Day of the month as a decimal number. | 1, 2, …, 31 |
@@ -456,4 +456,4 @@ We have created a new Django package called [django-nepali](https://github.com/o
456
456
 
457
457
  ## Contribution
458
458
 
459
- We appreciate feedback and contribution to this package. To get started please see our [contribution guide](CONTRIBUTION.md)
459
+ We appreciate feedback and contribution to this package. To get started please see our [contribution guide](./CONTRIBUTING.md)
@@ -1,7 +1,7 @@
1
1
  nepali/__init__.py,sha256=8Vx8S0r8UT5PoFdlGHBp59j84si87m4mWgGipzwhVvs,16
2
2
  nepali/char.py,sha256=WglBe0AefpsHwIXaPXr0FVjdI4qvmr06U8kSQLtvjdQ,3437
3
3
  nepali/constants.py,sha256=FA5qvFaiNKyQ5APQytDovbr9tBPIITgLpPMrR0UlbsY,1309
4
- nepali/date_converter.py,sha256=ZRmjTl7GjKW8Gvx2KKN3kyAd62lepHk8f6SJ8f0kLzQ,13551
4
+ nepali/date_converter.py,sha256=R2CvQN15mb7vcFB4eGpyPMYIcLPgYWw16BRyC8aIV3A,13575
5
5
  nepali/exceptions.py,sha256=CKg1wEUuzcog7w8Q7pGBNthi9oTOeg_3Aapx1WaTveY,329
6
6
  nepali/phone_number.py,sha256=QCAas5yyVVAXiS-CkO_-BGINmVTj96IwOyIn0-XVDZo,4172
7
7
  nepali/timezone.py,sha256=qRO9ALaEDH4LkPPKGtUlHbDo6TysfQclgVmmQmFrkMU,1995
@@ -29,7 +29,7 @@ nepali/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
29
29
  nepali/templatetags/nepalidatetime.py,sha256=g6UtfkToZtVDVe_Z9aGPwYPhNrPpZzvfi1bzFdTjSpg,5789
30
30
  nepali/templatetags/nepalinumber.py,sha256=hjq0cxI1o_uny_8aH9skUhqzhWi4YvnvY3ivdt1ulGU,2452
31
31
  nepali/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- nepali/tests/test_date_converter.py,sha256=rVUelyeuPziIN_1YewZqa0bgzCG-BzbjH_Dk7AKkJy4,5282
32
+ nepali/tests/test_date_converter.py,sha256=9Ubr_SytLIIj-ptF7vhbQVjOEZQ2PVauXj6E4utYIHw,5830
33
33
  nepali/tests/test_datetime.py,sha256=YjXGxnqeu4ytn5HpDU4CxwYTNmiB-KilJv10T2Wc5Eo,13581
34
34
  nepali/tests/test_humanize.py,sha256=DX0-I1aXZkBNSPtXKbRrIPiBVxzVaFRItlDwx4lDzko,3845
35
35
  nepali/tests/test_locations.py,sha256=DoiqiLh8FdvervTyqbbeG-f7QQDTOiQ4GJS68OheNPs,5968
@@ -39,8 +39,8 @@ nepali/tests/test_number.py,sha256=wDrAygSskvsLWGD3NqL8ButVdCwKbouzzmdL-ncqjpY,1
39
39
  nepali/tests/test_parser.py,sha256=_p6H09Ybw-sTRpNNgf7qMibEtnubI-HRECxrbLlgRnw,6712
40
40
  nepali/tests/test_phone_number.py,sha256=fswHlwgaiS3outmHOevNj1IVh0ZOYyrvuFKYBYODGRE,11726
41
41
  nepali/tests/test_timezone.py,sha256=-GBtiRU5msL9SjPeBBrZuXKMn89k_Q4mqhiT48W0BJE,6542
42
- nepali-1.1.0.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
43
- nepali-1.1.0.dist-info/METADATA,sha256=qAeuDu_ItzCjEHcbDisDuaVMqQRmKzBK4hVm0QDCfhY,14154
44
- nepali-1.1.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
45
- nepali-1.1.0.dist-info/top_level.txt,sha256=joX2GOfHg0KHYsDxi7eXDVTBQK0t6ZsvKz9uz7S6mFE,7
46
- nepali-1.1.0.dist-info/RECORD,,
42
+ nepali-1.1.1.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
43
+ nepali-1.1.1.dist-info/METADATA,sha256=7HqpBeucbg71RscCsa7ntJjd0N58YcNzzmlhu1bgstc,14156
44
+ nepali-1.1.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
45
+ nepali-1.1.1.dist-info/top_level.txt,sha256=joX2GOfHg0KHYsDxi7eXDVTBQK0t6ZsvKz9uz7S6mFE,7
46
+ nepali-1.1.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5