note 38054 added to ref.calendar
| From: | amichauer at NOSPAM dot gmx dot de | Date: | Sat, 06 Dec 2003 10:07:11 +0000 |
| Subject: | note 38054 added to ref.calendar | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61475@lists.php.net to get a copy of this message | ||
Where is CAL_HIJRI?
# Julian Day Count To Hijri
function JDToHijri($jd)
{
$jd = $jd - 1948440 + 10632;
$n = (int)(($jd - 1) / 10631);
$jd = $jd - 10631 * $n + 354;
$j = ((int)((10985 - $jd) / 5316)) *
((int)(50 * $jd / 17719)) +
((int)($jd / 5670)) *
((int)(43 * $jd / 15238));
$jd = $jd - ((int)((30 - $j) / 15)) *
((int)((17719 * $j) / 50)) -
((int)($j / 16)) *
((int)((15238 * $j) / 43)) + 29;
$m = (int)(24 * $jd / 709);
$d = $jd - (int)(709 * $m / 24);
$y = 30*$n + $j - 30;
return array($d, $m, $y);
}
# Hijri To Julian Day Count
function HijriToJD($d, $m, $y)
{
return (int)((11 * $y + 3) / 30) +
354 * $y + 30 * $m -
(int)(($m - 1) / 2) + $d + 1948440 - 385;
}
----
Manual Page -- http://www.php.net/manual/en/ref.calendar.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38054
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38054&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38054&report=yes
Search -- http://master.php.net/manage/user-notes.php