public function published($as='')
	{
		if (!$this->get('publish_up') || $this->get('publish_up') == '0000-00-00 00:00:00')
		{
			$this->set('publish_up', $this->get('created'));
		}

		$as = strtolower($as);

		if ($as)
		{
			if ($as == 'date')
			{
				return Date::of($this->get('publish_up'))->toLocal(Lang::txt('DATE_FORMAT_HZ1'));
			}

			if ($as == 'time')
			{
				return Date::of($this->get('publish_up'))->toLocal(Lang::txt('TIME_FORMAT_HZ1'));
			}

			return Date::of($this->get('publish_up'))->toLocal($as);
		}

		return $this->get('publish_up');
	}
public function published($as='')
	{
		if (!$this->get('publish_up') || $this->get('publish_up') == '0000-00-00 00:00:00')
		{
			$this->set('publish_up', $this->get('created'));
		}

		$as = strtolower($as);

		if ($as)
		{
			if ($as == 'date')
			{
				return Date::of($this->get('publish_up'))->toLocal(Lang::txt('DATE_FORMAT_HZ1'));
			}

			if ($as == 'time')
			{
				return Date::of($this->get('publish_up'))->toLocal(Lang::txt('TIME_FORMAT_HZ1'));
			}

			return Date::of($this->get('publish_up'))->toLocal($as);
		}

		return $this->get('publish_up');
	}
public function published ( $ as = '' ) { if ( ! $ this -> get ( 'publish_up' ) || $ this -> get ( 'publish_up' ) == '0000-00-00 00:00:00' ) { $ this -> set ( 'publish_up' , $ this -> get ( 'created' ) ) ; } $ as = strtolower ( $ as ) ; if ( $ as ) { if ( $ as == 'date' ) { return Date :: of ( $ this -> get ( 'publish_up' ) ) -> toLocal ( Lang :: txt ( 'DATE_FORMAT_HZ1' ) ) ; } if ( $ as == 'time' ) { return Date :: of ( $ this -> get ( 'publish_up' ) ) -> toLocal ( Lang :: txt ( 'TIME_FORMAT_HZ1' ) ) ; } return Date :: of ( $ this -> get ( 'publish_up' ) ) -> toLocal ( $ as ) ; } return $ this -> get ( 'publish_up' ) ; }
Return a formatted timestamp

@param   string  $as  What format to return
@return  string
Return a formatted timestamp