function cmfcCalendarV1Iranian::timestampToInfoArray in Calendar Systems 7
Same name and namespace in other branches
- 8 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::timestampToInfoArray()
- 8.2 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::timestampToInfoArray()
- 5 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::timestampToInfoArray()
- 6.3 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::timestampToInfoArray()
- 6 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::timestampToInfoArray()
- 7.3 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::timestampToInfoArray()
- 7.2 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::timestampToInfoArray()
Overrides cmfcCalendarV1::timestampToInfoArray
File
- calendar/
v1/ calendarSystems/ iranian.class.inc.php, line 85
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;
}