function cmfcCalendarV1Gregorian::timestampToInfoArray in Calendar Systems 7.3
Same name and namespace in other branches
- 8 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::timestampToInfoArray()
- 8.2 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::timestampToInfoArray()
- 5 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::timestampToInfoArray()
- 6.3 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::timestampToInfoArray()
- 6 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::timestampToInfoArray()
- 7 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::timestampToInfoArray()
- 7.2 calendar/v1/calendarSystems/gregorian.class.inc.php \cmfcCalendarV1Gregorian::timestampToInfoArray()
Overrides cmfcCalendarV1::timestampToInfoArray
File
- calendar/
v1/ calendarSystems/ gregorian.class.inc.php, line 90
Class
- cmfcCalendarV1Gregorian
- @desc
Code
function timestampToInfoArray($timestamp = null) {
if (is_null($timestamp)) {
$timestamp = $this
->phpTime();
}
$arr = $this
->phpGetDate($timestamp);
$arr['month'] = $arr['mon'];
$arr['day'] = $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;
$arr['monthDaysNumber'] = $this
->phpDate('t', $timestamp);
$arr['weekday']++;
$arr['weekday'] = $arr['wday'];
$arr['weekdayName'] = $this
->getWeekName($arr['weekday']);
$arr['weekdayShortName'] = $this
->getWeekShortName($arr['weekday']);
return $arr;
}