问题
Im trying to convert a date in this format (1 بهمن 1397) into a Georgian calendar datetime. I'm using dateparser and I keep getting the type error: "'<=' not supported between instances of 'str' and 'int'". This is the relevant part of the script:
date = HijriCalendar(u'24 دی 1397').get_date()
print(date)
回答1:
The date is not Hijri/Islamic date(Lunar), it is Iranian date(Solar) en.wikipedia.org/wiki/Iranian_calendars. You should search for persian/iranian/khorshidi/jalali calendars.
Khayyam3 is a library to use date & time in persian style(known as Jalali calendar or khayyam alg) https://pypi.org/project/Khayyam3/
来源:https://stackoverflow.com/questions/54368860/converting-date-from-hijri-islamic-calendar-to-georgian-calendar