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