public function getDateFormats() { $formats = array('j %month:gen% Y', '%Month% Y', 'd.m.Y', 'd/m/Y', 'H:i'); $res = array(); foreach ($formats as $f) { $res[$f] = fx::date(time(), $f); } return $res; }
protected function beforeUpdate() { parent::beforeUpdate(); if ($this->isModified()) { $this['last_updated'] = fx::date(time()); } }