9
Sorry,
I think have forgotten that I used formatTimeStamp with a new constant
but in reality the function is missing that I created again:
le="color: #000000"><?php switch ($format) { case 's': $datestring = _SHORTDATESTRING; break; case 'm': $datestring = _MEDIUMDATESTRING; break; case 'mysql': $datestring = 'Y-m-d H:i:s'; break; case 'l': $datestring = _DATESTRING; break; case 'c': case 'custom': static $current_timestamp, $today_timestamp, $monthy_timestamp; if (!isset($current_timestamp)) { $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset); } if (!isset($today_timestamp)) { $today_timestamp = mktime(0, 0, 0, date('m', $current_timestamp), date('d', $current_timestamp), date('Y', $current_timestamp)); } if (abs($elapse_today = $usertimestamp - $today_timestamp) < 24 * 60 * 60) { $datestring = ($elapse_today > 0) ? _TODAY : _YESTERDAY; } else { if (!isset($monthy_timestamp)) { $monthy_timestamp[0] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp)); $monthy_timestamp[1] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp) + 1); } $datestring = _YEARMONTHDAY; if ($usertimestamp >= $monthy_timestamp[0] && $usertimestamp < $monthy_timestamp[1]) { $datestring = _MONTHDAY; } } break; default: $datestring = _DATESTRING; if ($format != '') { $datestring = $format_copy; } break; }