note 57133 added to function.jdmonthname
| From: | Shai at osu1 dot php dot net | Date: | Sat, 24 Sep 2005 22:12:14 +0000 |
| Subject: | note 57133 added to function.jdmonthname | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95726@lists.php.net to get a copy of this message | ||
YIQV, this should correct your issue with Adar being displayed as AdarI:
<?php
// assuming that $jewish_month is the Jewish month,
// and $jewish_year is the Jewish year,
// you can use this script to replace 'Adar I' with 'Adar' when it is not a leap
year.
// this is because a Jewish leap year occurs every 3rd, 6th, 8th, 11th, 14th, 17th, and 19th year.
if( $jewish_month == "AdarI" &&
$jewish_year%19 != 0 &&
$jewish_year%19 != 3 &&
$jewish_year%19 != 6 &&
$jewish_year%19 != 8 &&
$jewish_year%19 != 11 &&
$jewish_year%19 != 14 &&
$jewish_year%19 != 17
) {
$jewish_month = "Adar";
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.jdmonthname.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57133
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57133&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57133&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57133&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57133&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57133&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57133&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57133&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57133&report=yes
Search -- http://master.php.net/manage/user-notes.php