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 %b and %B directive. #116

Closed Mojtaba-saf closed 2 years ago

Mojtaba-saf commented 2 years ago

added two regex patterns to detect Jalali month name. now it uses those patterns to detect month from %b and %B directives and if it finds them uses months(j_months_en,j_months_short_en) in Date to detect the numerical representation.

I tried to make it work like datetime.datetime.strptime(). so uppercase and lowercase letters in date_string. eg: for farvardin Far, FAr, fAr, FAR and far with %b directive return the same result. This is true for %B too.