Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103107 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15216 invoked from network); 31 Aug 2018 00:32:24 -0000 Received: from unknown (HELO mail-oi0-f52.google.com) (209.85.218.52) by pb1.pair.com with SMTP; 31 Aug 2018 00:32:24 -0000 Received: by mail-oi0-f52.google.com with SMTP id r69-v6so17862724oie.3 for ; Thu, 30 Aug 2018 13:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8GW+igUVm+fNcnMpIIKzEDiXCHZpsEdgIqAAGhyyi5w=; b=LxgRbYuGw69jHiTjFxrT9OSeKaN/Rzq001Sskk4tBUbwkcLNJ0HOzAas24e3Z4eRBP 5KdaUgc5GIvwQYMUf04HaEW1/GYxC7uT3w5sMYvwJgN33U+sNWrWynL330IgybB5fiZv tDp++Ru7HJfae+vxqCTPlEsc0WlEf1x7jsA9pwMnbTFanL670kF0hQBzpqRISOjiHrLy ykier7E558t0l6lJ/YF6157KHCoc06AJRuPmPIP9A8s4GWgMqnt7YZNek/Y6KE9unQdL 5Uytt+syeHWDDA5FKyqQuRTuT/WPdT8X9o4aN2pPxFyeBb/XcqcMMc8NMOlHFjjF+fhU /1mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8GW+igUVm+fNcnMpIIKzEDiXCHZpsEdgIqAAGhyyi5w=; b=FDduqUFsCKsUsyLZik3YLRvye2nEXOlWhSLqpZpy9xFoUfrvHwXfaEmbsVA8jsyZf8 WwO2udUmJk26OnYqWJKFLGYu48HMcDTYqTtkalCR1G5rcqdJ3P8FATr7C8a0C1KhpilH yMiZKHobbjYhkl93/zj9K2iXUgfWWOytfMF1+KB352tZdk+DEWwHDOLm0ILWx6TCbJ2N rupAMITRGEB3x0DLfM/gz2ghTpRMqtfRVDDtJMxIyQuc7IQQ3OxzF3EU/DH1NXxQnN+w 6xPH7paJ5CEP4qnEYvX5z8CjV6ElyPiVqXoTDXGIcvDt0ytScQ7LJx0GUArSxGEART7h dqVQ== X-Gm-Message-State: APzg51Bcp7wU6OfLZkUga2gNXF4Q0bEMGoMeXIJN4yO3NfGUGOoTkRAF U8TnHj/HYndBHVQeCzZQ38k1T9sYF2bFBCF0C5kEMg== X-Google-Smtp-Source: ANB0VdZfd5acCoFm/yJdQBz1JBL3stzTppq1FYXJkYaZz5mGE6lhFf0cr6CaE5OEzJIetgh6KdeEyn7S1xTp0VcIjR4= X-Received: by 2002:aca:2b14:: with SMTP id i20-v6mr4355547oik.335.1535661230229; Thu, 30 Aug 2018 13:33:50 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:4148:0:0:0:0:0 with HTTP; Thu, 30 Aug 2018 13:33:49 -0700 (PDT) Date: Thu, 30 Aug 2018 15:33:49 -0500 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Proposal: Add tabular Islamic calendar to calendar conversion functions From: weberk294@gmail.com (Kurt Weber) Hi, everyone. The calendar conversion functions currently support (via Julian Day Numbers as an intermediary) conversion between Gregorian, Julian, Hebrew, and French Revolutionary calendars. Conspicuously absent is the Islamic calendar. A comment in ext/calendar/sdncal.h seems to suggest that the original author(s) intended to implement at some point, but never got around to it. The Islamic calendar offers some complications because in most places and communities that use it for religious purposes, the switch from one month to the next is based on actually observing the moon in the proper phase. In theory the date of this change can be calculated (and indeed the early Islamic surge in study of astronomy was motivated by the wish to know about when they should start looking), but tradition still demands that it be actually observed before a change is made--the actual impact of this is that local sky or weather conditions can sometimes interfere with the observation in a particular jurisdiction, meaning that often it comes a day or so later than when it otherwise would. Consequently, what I'm proposing is the Tabular Islamic Calendar, which was specifically created to be predictable and calculable. It is of limited use for religious purposes (and documentation should probably be clear about this), but it would be useful for, e.g. people working with historical documents from Islamic communities or groups (In fact, this is how I came to this problem--I am working on a Ph.D. in Russian history, and as a side project I'm developing a PHP-backed website to manage research notes and other information; because I work on prerevolutionary Russia I'm very familiar with the issue of needing to convert between calendar systems (in my case, Julian and Gregorian), and my colleagues working on Islamic history often have similar issues.). Tabular Islamic calendar is not ideal, but it seems like the only realistic option for automated conversion. As far as implementation goes, I could do it. I've already implemented conversion one way, before I stopped work in case there were issues that come up in this discussion that I hadn't foreseen (unfortunately, that happened roughly at the time the mailing list server seems to have died, so it's been paused for a couple of weeks). So all I'd have to do is the other direction, and it'd be ready to test. --Kurt Weber