Example #1
0
function now()
{
    $date = date_create();
    $array = array('unix' => date_timestamp_get($date), 'human' => unix2locale(date_timestamp_get($date), null), 'object' => $date);
    return $array;
}
Example #2
0
 public function unix2locale($date = null, $format = null)
 {
     if (empty($date)) {
         $date = time();
     }
     if (empty($format)) {
         $format = $this->date_format;
     }
     return unix2locale($date, $format);
 }