slashmili / python-jalali

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

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

Closed 5j9 closed 2 years ago

5j9 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

hramezani commented 2 years ago

@5j9 Thanks for your patch :+1: . I left some initial comments. I will take a deeper look later.

hramezani commented 2 years ago

@5j9 I left some minor comments. Please address them and then we are good to go :tada:

hramezani commented 2 years ago

@5j9 Could you please fix the remaining comments?

hramezani commented 2 years ago

Thanks, @5j9 for this patch. I've created a new PR and included your patch https://github.com/slashmili/python-jalali/pull/111 Now, it got merged in https://github.com/slashmili/python-jalali/commit/f7af4724cd47ecccf6e8cda8520b41213ce71ff3