Re: Re: farsi calendar components

From: Roozbeh Pournader (
Date: Thu Mar 13 2003 - 07:22:46 EST

  • Next message: "Re: Re: Re: farsi calendar components"

    On Thu, 13 Mar 2003 wrote:

    > > Do you mean the Persian calendar (as used in Iran and Afghanistan, also
    > > known as the solar Islamic calendar or "Hejri-e Shamsi"), or a Gregorian
    > the Persian one.

    Some C code is available with an LGPL license at:


    You can easily port it to Java if you only need the conversion to and from
    Gregorian. But if you need a complete class that's inherited from a proper
    calendar class, I don't know of any. I'm working on one for ICU in my free
    time, but I don't have any release date.

    On the same topic:

     * The above code is not the official leap year algorithm used in Iran,
       but it is as close as we can get for the moment. Some parts of the
       official algorithm used in Iran is private and is only known to the
       calendar authorities. We are working on finding and releasing that to
       the public (but I guess you needn't worry, as the first date that may
       make a difference, is some date in 2057).

     * The official leap year algorithm used in Afghanistan is different and
       very simple: first day of every Persian year is March 21, so the leap
       years are synchronized to the Gregorian ones to some degree. Thus, there
       are sometimes a one-day difference between the Iranian calendar and the
       Afghan calendar. That may get changed in a short while, as there are
       plans for an official synchronized Persian calendar of Iran and
       Afghanistan that doesn't depend on a geographic base of a certain
       latitude and longitude.


    This archive was generated by hypermail 2.1.5 : Thu Mar 13 2003 - 08:06:45 EST