format_date('2011-02-08', 'EEE, dd MMM yyyy')
isso retornaria ter, 08 fev 2011
as opções de formatação segue abaixo com a parte do helper que trata o parâmetro:
switch ($pattern) { case 'd': return $this->formatInfo->ShortDatePattern; break; case 'D': return $this->formatInfo->LongDatePattern; break; case 'p': return $this->formatInfo->MediumDatePattern; break; case 'P': return $this->formatInfo->FullDatePattern; break; case 't': return $this->formatInfo->ShortTimePattern; break; case 'T': return $this->formatInfo->LongTimePattern; break; case 'q': return $this->formatInfo->MediumTimePattern; break; case 'Q': return $this->formatInfo->FullTimePattern; break; case 'f': return $this->formatInfo->formatDateTime($this->formatInfo->LongDatePattern, $this->formatInfo->ShortTimePattern); break; case 'F': return $this->formatInfo->formatDateTime($this->formatInfo->LongDatePattern, $this->formatInfo->LongTimePattern); break; case 'g': return $this->formatInfo->formatDateTime($this->formatInfo->ShortDatePattern, $this->formatInfo->ShortTimePattern); break; case 'G': return $this->formatInfo->formatDateTime($this->formatInfo->ShortDatePattern, $this->formatInfo->LongTimePattern); break; case 'i': return 'yyyy-MM-dd'; break; case 'I': return 'yyyy-MM-dd HH:mm:ss'; break; case 'M': case 'm': return 'MMMM dd'; break; case 'R': case 'r': return 'EEE, dd MMM yyyy HH:mm:ss'; break; case 's': return 'yyyy-MM-ddTHH:mm:ss'; break; case 'u': return 'yyyy-MM-dd HH:mm:ss z'; break; case 'U': return 'EEEE dd MMMM yyyy HH:mm:ss'; break; case 'Y': case 'y': return 'yyyy MMMM'; break; default : return $pattern;
MUITO UTIL SEU SITE
ResponderExcluir