Sunday, December 14, 2008

Google calendar reaches Arabic users

Recently, Google calendar has released a couple of features that have tremendous impact on Arabic users using Google software.

In November, as part of their 40 language initiative, Google offered their calendar in Arabic and Hebrew. This not only means that it is shown in those languages, but that it is shown in a right-to-left layout as well. 

Last week, they again showed their continuing interest in internationalizing their products by introducing non-Gregorian calendar support in Google calendar. As always, Google is starting small and iterating it slowly based on user feedback, so they have only one calendar supported - The Hijri (Islamic) calendar.

I lied. Not one. They are supporting three calendars. Three versions of Hijri calendar.

Hijri calendar is followed in three ways:

  1. Based on moon's visible position. A new month starts at the sunset after a new moon where the moon is up in the sky when the sun sets. If the moon is not visible in the sky when the sun sets after a new moon day, the start of the next day is postponed to the next day.

    This is the traditional way of reckoning, and this is still used for determining some religious dates. For civil use, the dates are determined by one of the pre-computed ways (described below).

    This is called the "Observational calendar".
  2. Based on moon's true position. The dates are computed based on the definition given above using rigorous astronomical calculations.

    This is called the "Astronomical calendar".
  3. Based on an approximating, arithmetic algorithm. Back from the 9th century, Islamic scholars had developed sufficiently accurate arithmetic calendars. These calendars assume that the time between two new moons is a constant 29.53 days, assigns 30 and 29 days for alternate months, and a year consists of 12 lunar months. When the excess time amounts to a day, a leap day is added at the end of the 12th month. There are 11 leap years in a 30-year cycle.

    This is called the "Arithmetic calendar".
The observational calendar is very hard to support, because it changes from place to place, Imam to Imam, and it will only be declared on the first day. It is unfair to say that Google cannot do it - they can set a few servers to keep track of each place's observed new moon that gets updated every month - and they are already doing similar Aegean tasks (Consider the way they update currency conversions, timezone changes, map changes and a variety of such things) that may appear impossible before they implement them. Anyway, they haven't supported that this time.

The astronomical calendar needs complex astronomical calculations, but it is just a minor job for a company that can update the fastest path between two points in a map along with the user dragging to his desired route. The real issue is that the astronomical calendar varies from place to place. Google has provided support only for one astronomical calendar - the Umm Al-Qura calendar that computes the dates based on the moon's position as viewed from Mecca. This calendar is slowly becoming the de-facto standard in Arab countries.

There are a variety of arithmetic calendars in practice. They are simple to calculate, and hence most of the software systems supporting Hijri calendar provides one  of this variety.

Microsoft Outlook relies on an algorithm which they call "Kuwaiti Algorithm", which is nothing but an arithmetic algorithm considering Thursday, July 15, 622 (Julian) as the epoch and the years 2, 5, 7, 10, 13, 15, 18, 21, 24, 26 and 29 in a 30-year cycle as leap years. Google supports this variety as well.

A more popular arithmetic algorithm is supported by GNU Emacs and many other software systems, and it gives closer values to the astronomical dates for middle east for most of the years than the Kuwaiti. It uses Friday, July 16, 622 (Julian) as the epoch, and considers the 16th year, instead of the 15th, as leap. In general, this calendar deviates from the Kuwaiti by a day (except on the 16th year, where these two systems coincide). Google supports this also and calls it "Hijri - Standard".

Thus, Google supports three major variations of Hijri calendar, and this should be sufficient for the majority of users. However, there are a number of other variations as well, including the Fatimid calendar, used by a lot of Muslims in India and Pakistan, and different astronomical calendars used in East Asian countries.

While Microsoft Outlook shows the alternate calendar on the other corner of the cell in date cells and in brackets in general fields, Google is showing them in brackets consistently.

Enabling the alternate calendar is very simple. Go to the calendar settings and select the desired calendar from the drop down box next to "Alternate calendar".





The date fields now show the alternate calendar in brackets.

The screen shots below give alternate dates in the four views of Google calendar.

Day view:



Week view:



Month view:


Agenda view:





The following screen shots give the same in Arabic.

Day view:



Week view:



Month view:



Agenda view:





This look pretty impressive, but there are a few drawbacks of the current Google calendar when compared to Microsoft Outlook:

  1. It is not possible to define recurring events based on the alternate calendar. In fact, the alternate dates do not appear in any event pages.
  2. The alternate date is displayed in the same language and date format as of the main Gregorian date. This is not acceptable in many cases. For example, Islamic dates are always displayed in the dd-mm-yyyy format while Chinese and Hebrew dates are written with special date names/symbols rather than numbers. There should be provision to select the language and date format.
  3. Microsoft allows a user-configurable month offset using which slight date variations, including that for observational calendar, can be accommodated. This is not in Google calendar.
Despite these drawbacks, Google has shown its support to the software for the world. Kudos!

No comments:

Post a Comment