You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
otherdate = datetime(2020, 6, 14, 19, 15, 20, 231407)
jeth_32 = nepali_datetime.date.from_datetime_date(otherdate.date())
jeth_32.strftime("%d %N %Y")
# day of month out of range error
Dunno if this is related with (Nepali) months with 32 date or something in the package itself.
If it helps, I am using Python 3.9, nepali-datetime 1.0.4.
Edit:: Update: Getting same error for Shrawan 32.
The text was updated successfully, but these errors were encountered:
Hi. sorry for the late reply.
Assuming the same code above,
jeth_31.strftime("%d %N %Y") # produces '31 जेष्ठ 2077'
# Meanwhile
jeth_32.strftime("%d %N %Y")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\Python\Python39\lib\site-packages\nepali_datetime\__init__.py", line 422, in strftime
return _wrap_strftime(self, fmt, self.timetuple())
File "C:\Users\user\Python\Python39\lib\site-packages\nepali_datetime\__init__.py", line 130, in _wrap_strftime
return _time.strftime(newformat, timetuple)
ValueError: day of month out of range
Hi. I have been getting this
day of month out of range
error when trying to convert date to nepali; and format time.While rendering Jestha 31, 2077
Meanwhile Jestha 32, 2077
Dunno if this is related with (Nepali) months with 32 date or something in the package itself.
If it helps, I am using Python 3.9, nepali-datetime 1.0.4.
Edit:: Update: Getting same error for Shrawan 32.
The text was updated successfully, but these errors were encountered: