[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://docs.oracle.com/javase/8/docs/api/java/time/chrono/HijrahChronology.html]
(Apple supports the Hijri calendar in 5 of their SDKs (Software Development 
Kits))[https://developer.apple.com/documentation/foundation/calendar.identifier]
(Microsoft Windows supports Hijri calendar 
naively)[https://www.microsoft.com/middleeast/msdn/ArabicCalendar.aspx]
(Microsoft Office has native 
support)[https://blogs.technet.microsoft.com/office_global_experience/2010/01/13/um-al-qura-calendar-support-in-office-2010/]
(Android Hijri calendar 
support)[https://developer.android.com/reference/android/icu/util/IslamicCalendar.html]
(Google Calendar allows Hijri calendar as an alternate 
calendar)[https://www.maketecheasier.com/display-alternate-calendar-google-calendar/]

--
messages: 305199
nosy: haneef95
priority: normal
severity: normal
status: open
title: Native hijri calendar support
type: enhancement
versions: Python 2.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue31895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 made libraries.

--

___
Python tracker 
<https://bugs.python.org/issue31895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to a standard Python library.

@Lemburg, I checked out the PyPi convertdate library, as Gareth mentioned, it 
doesn't specify which Islamic calendar it is implementing and had a look at the 
code, it doesn't look like Umm al-Qura. It seems to be a very roughly 
calculated Tabular Lunar Calendar (with Hijrah as the reference point), no 
where near accurate to the actual lunar cycles.


@Gareth
To explain Islamic Hijri Calendar in short, it is basically a sighted Lunar 
calendar, which has to be sighted at the end of every month to determine the 
beginning of the next month. Therefore, it is not possible to determine the 
dates in future (beyond 29th of the month). Every month could be 29 or 30 days. 
There are 12 months and 354 days in a year.
However, to solve this issue, Muslim astronomers and Scholars over the course 
of History (1400years) have used two different types of Hijri calendars; one 
sighted and another calculated. The sighted version of the calendar is accurate 
but cannot go beyond 29th of the current month.
The astronomically calculated version could go up-to a fixed period which the 
astronomers have calculated. The calculated/civil calendar is used for Visas, 
deeds, bank statements, appointments and other civil matters in their 
respective countries.

One of the predominantly used and astronomically calculated Hijri calendars is 
the Umm al-Qura Hijri calendar. It was calculated by scholars & astronomers at 
the Umm al-Qura (Makkah) University.

Sorry about the long post, hope this helps.

--

___
Python tracker 
<https://bugs.python.org/issue31895>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com