Closed sardok closed 8 years ago
True, the docs even show this explicitly:
>>> from dateparser.calendars.jalali import JalaliParser
>>> JalaliParser(u'جمعه سی ام اسفند ۱۳۸۷').get_date()
datetime.datetime(2009, 3, 20, 0, 0)
>>> from dateparser.calendars.hijri import HijriCalendar
>>> HijriCalendar(u'17-01-1437 هـ 08:30 مساءً').get_date()
{'date_obj': datetime.datetime(2015, 10, 30, 20, 30), 'period': 'day'}
I don't know Hijri so I can't say if 'period': 'day'
is needed or not
<period> ::= <day> | <month> | <year>
applies to both hijri and jalali calendar cases.
Fixed in #221
HijriCalendar and JalaliCalendar implement BaseCalendar. But these two classes'
get_date
function's return type differs. This should be fixed by defining an interface for BaseCalender.