[issue31895] Native hijri calendar support

2020-03-17 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: How to implement api in python website -> Native hijri calendar support ___ Python tracker ___

[issue31895] Native hijri calendar support

2017-11-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Haneef, thank you for the explanation. Any such addition would need a PEP. But I agree with Marc-Andre that supporting the multitude of calendars is out of scope for the stdlib. So I suspect such a PEP would be rejected, with the suggestion already given h

[issue31895] Native hijri calendar support

2017-10-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: There are other PyPI packages available for this specific calendar as well, e.g. https://pypi.python.org/pypi/umalqurra/ Perhaps you could send Neil a PR to make the calculation more accurate ?! In any case, the stdlib is not meant to cover everything, on

[issue31895] Native hijri calendar support

2017-10-30 Thread Haneef
Haneef added the comment: Thanks @steven.daprano, yeah, it would be good to have support for other calendars as well. In my case, I use the Hijri Umm al-Qura, Gregorian and obviously UnixTime calendars. You're right, maybe it would be wiser to implement it in the PyPi first and then move it

[issue31895] Native hijri calendar support

2017-10-30 Thread Gareth Rees
Gareth Rees added the comment: convertdate does not document which version of the Islamic calendar it uses, but looking at the source code, it seems that it uses a rule-based calendar which has a 30-year cycle with 11 leap years. This won't help Haneef, who wants the Umm al-Qura calendar. --

[issue31895] Native hijri calendar support

2017-10-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I agree with Steven: It's best to use a PyPI package for calendar support such as https://pypi.python.org/pypi/convertdate/. We only have the standard Gregorian calendar support in datetime and calendar modules. -- nosy: +lemburg ___

[issue31895] Native hijri calendar support

2017-10-30 Thread Gareth Rees
Gareth Rees added the comment: It is a substantial undertaking, requiring a great deal of expertise, to implement the Islamic calendar. The difficulty is that there are multiple versions of the calendar. In some places the calendar is based on human observation of the new moon, and so a datab

[issue31895] Native hijri calendar support

2017-10-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: Python 2.7 is in feature freeze, so 3.7 is the absolute earliest this could be introduced. Given how close we are to 3.7 feature freeze, 3.8 is more likely. I don't think we would have any objections to supporting hijri calendar, in principle, but as a pract

[issue31895] Native hijri calendar support

2017-10-29 Thread Haneef
Haneef added the comment: This feature can be added to the (datetime.py)[https://docs.python.org/3/library/datetime.html], Java has done a similar move and it makes the whole process a lot easier. The Hijri calendar is used across the globe by various websites and developers, some have even

[issue31895] Native hijri calendar support

2017-10-29 Thread Haneef
New submission from Haneef : There should be native support for converting between Hijri (Umm al-Qura), Gregorian, Julian and UnixTime calendars. Many big players have included native support for Hijri calendar in their SDKs and software. Below are some: (Java Hijri calendar support)[https:/