slashmili / python-jalali

Jalali calendar binding for Python based on Python's datetime module
http://pypi.python.org/pypi/jdatetime/
Other
337 stars 47 forks source link

day is out of range for month #69

Closed mohammadalimehdizadeh closed 4 years ago

mohammadalimehdizadeh commented 4 years ago

python 3.7.6 jdatetime 3.6.2

Python 3.7.6 (default, Jan  8 2020, 19:59:22) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import jdatetime
>>> jdatetime.date(1390,12,30)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mam/mycode/AlgoTrading/codal/tse/env/lib/python3.7/site-packages/jdatetime/__init__.py", line 220, in __init__
    raise ValueError("day is out of range for month")
ValueError: day is out of range for month
>>> 

but this day exist!

slashmili commented 4 years ago

Well I don't have a real printed calendar for 1390, but time.ir says that Esfand 1390 had only 29 days

Screenshot 2020-08-19 at 22 45 45