Results 1 to 4 of 4

Thread: Change Date To Ghamary

  1. #1
    Join Date
    Feb 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Change Date To Ghamary

    hi all

    How can change date to [ HIJRI GHAMARY ] OR [ GHAMARI ] with php?


    Help Me

  2. #2
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    What?

  3. #3
    Join Date
    Jan 2007
    Posts
    82
    Thanks
    30
    Thanked 18 Times in 17 Posts

    Default

    If I am understanding his/her request correctly... they basically want a conversion to a lunar calendar, as this is what most of the Arabic countries use.

    In order to do so, a basic calculation would need to be performed to calculate the lunar calendar day, based on our standard calendar (Julian Year - 365.25 days). A lunar year is 354.75 days, so all you really need to do is pick a reference point and let the numbers so the rest!

    total days / days of year = # of years, with a remainder of days
    would work accurately.

    The months of a lunar calendar is what I don't know. If you can provide/post a list of the months, for a normal year and a leap year, I could put you a little script together that would change the dates back and forth.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That's difficult. The Hijri calendar is not calculated in a numerical way, but rather based on lunar and other events which, though possible to calculate, are, as far as I know, based more on observation than prediction. Seeing the moon in Egypt is, for example, how a month may start or end. I don't know the details, though. Considering, I guess that a numerical approximation won't be entirely accurate in some sense.

    Here's something that may help: http://www.phpclasses.org/browse/package/3850.html

    Google has a LOT of results. It might take some time to find something you like, but I'm sure you can find something if you look hard enough.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •