function cmfcCalendarV1Arabic::timestampToInfoArray in Calendar Systems 8
Same name and namespace in other branches
- 8.2 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::timestampToInfoArray()
- 6.3 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::timestampToInfoArray()
- 6 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::timestampToInfoArray()
- 7.3 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::timestampToInfoArray()
- 7 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::timestampToInfoArray()
- 7.2 calendar/v1/calendarSystems/arabic.class.inc.php \cmfcCalendarV1Arabic::timestampToInfoArray()
Overrides cmfcCalendarV1::timestampToInfoArray
File
- calendar/
v1/ calendarSystems/ arabic.class.inc.php, line 101
Class
Code
function timestampToInfoArray($timestamp = null) {
$arr = $this
->phpGetDate($timestamp);
if (is_null($timestamp)) {
$timestamp = $this
->phpTime();
}
list($arr['year'], $arr['month'], $arr['day']) = $this
->fromGregorian($arr['year'], $arr['mon'], $arr['mday']);
$arr['monthName'] = $this
->getMonthName($arr['month']);
$arr['monthShortName'] = $this
->getMonthShortName($arr['month']);
$arr['monthFirstDayWeekday'] = $this
->phpDate('w', $this
->infoArrayToTimestamp(array(
'year' => $arr['year'],
'month' => $arr['month'],
'day' => '1',
))) + 1;
if ($arr['monthFirstDayWeekday'] >= 6) {
$arr['monthFirstDayWeekday'] = 0;
}
$arr['monthDaysNumber'] = $this
->date('t', $timestamp);
$arr['weekday']++;
$arr['weekday'] = $arr['wday'];
$arr['weekdayName'] = $this
->getWeekName($arr['weekday']);
$arr['weekdayShortName'] = $this
->getWeekShortName($arr['weekday']);
return $arr;
}