function cmfcCalendarV1Arabic::monthTotalDays in Calendar Systems 8
Same name and namespace in other branches
- 8.2 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::monthTotalDays()
- 6.3 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::monthTotalDays()
- 6 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::monthTotalDays()
- 7.3 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::monthTotalDays()
- 7 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::monthTotalDays()
- 7.2 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::monthTotalDays()
* @author * Find Number Of Days In This Month
1 call to cmfcCalendarV1Arabic::monthTotalDays()
- cmfcCalendarV1Arabic::date in calendar/
v1/ calendarSystems/ arabic.class.inc.php - Implementation of PHP date function This is the simplified version by Sina Salek
File
- calendar/
v1/ calendarSystems/ arabic.class.inc.php, line 717
Class
Code
function monthTotalDays($month, $day, $year) {
$jday2 = "";
$jdate2 = "";
$lastdayen = $this
->phpDate("d", parent::mktime(0, 0, 0, $month + 1, 0, $year));
list($jyear, $jmonth, $jday) = $this
->fromGregorian($year, $month, $day);
$lastdatep = $jday;
$jday = $jday2;
while ($jday2 != "1") {
if ($day < $lastdayen) {
$day++;
list($jyear, $jmonth, $jday2) = $this
->fromGregorian($year, $month, $day);
if ($jdate2 == "1") {
break;
}
if ($jdate2 != "1") {
$lastdatep++;
}
}
else {
$day = 0;
$month++;
if ($month == 13) {
$month = "1";
$year++;
}
}
}
return $lastdatep - 1;
}