khayyam icon indicating copy to clipboard operation
khayyam copied to clipboard

A Persian Date & Time (aka: Jalali Calendar) library with timezone, DST (daylight-saving), full formatting & parsing support for python 2.x & 3.x.

Results 13 khayyam issues
Sort by recently updated
recently updated
newest added

When the calendar switches from 1403 to 1404, all the dates are off by one day due to the leap year.

http://en.wikipedia.org/wiki/Leap_year

1403 [is a leap year](https://fa.wikipedia.org/wiki/%DB%B1%DB%B4%DB%B0%DB%B3_(%D8%AE%D9%88%D8%B1%D8%B4%DB%8C%D8%AF%DB%8C)), but the library fails to recongnize it as a leap year: ```python In [1]: from khayyam.algorithms_pure import is_jalali_leap_year In [2]: is_jalali_leap_year(1403) Out[2]: False ```

Since the general policy for Daylight saving time in Iran has been revoked, using ```TehranTimezone()``` function will return an incorrect answer starting 1/1/1402. ``` class TehranTimezone(Timezone): """ Tehran timezone with...

File "/usr/local/lib/python3.7/site-packages/khayyam/jalali_datetime.py", line 399, in utcoffset return self.tzinfo.utcoffset(self) TypeError: utcoffset(dt) argument must be a datetime instance or None, not JalaliDatetime

bug

the default datetime module return timetuple with hour, minute, and second but what JalaliDatetime.timetuple() returns doesn't have these three items, so sadly in my case I should make my timetuple...

bug

%f zero padded example edited