slashmili / python-jalali

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

feat(strptime): handle `%y` and `%f` directives #111

Closed hramezani closed 2 years ago

hramezani commented 2 years ago

Rewrite strptime to make the code more clear.

This implementation assumes 14th century for 00 <= %y <= 68 and 13th century for 69 <= %y <= 99.

This patch also fixes a bug in strptime where it could not handle ? in the format string.

Tests where added.

closes #100