<?php $date = !empty($date) ? $date : null; if (is_string($date)) { $date = zbase_date_from_db($date); } ?> <time datetime="<?php echo $date->format('Y-m-d H:i:s'); ?> " title="<?php echo $date->format('F d, Y h:i A'); ?> "><?php echo zbase_date_human($date); ?> </time>
/** * Readable DAte * Difference for Humans * @return string */ function zbase_date_human_formatted($time, $format = DATE_FORMAT_DB) { return zbase_date_from_format($format, $time)->format('F d, Y h:i A') . ' [' . zbase_date_human($time) . ']'; }
public function displayTime() { return zbase_date_human($this->created_at); }