Skip to content

Instantly share code, notes, and snippets.

@ricardofiorani
Created May 27, 2015 17:50
Show Gist options
  • Select an option

  • Save ricardofiorani/50f19629d8e29e99662f to your computer and use it in GitHub Desktop.

Select an option

Save ricardofiorani/50f19629d8e29e99662f to your computer and use it in GitHub Desktop.
public function exibirDataDiaMes($time) {
$mes_extenso = array(
'Jan' => 'Janeiro',
'Feb' => 'Fevereiro',
'Mar' => 'Marco',
'Apr' => 'Abril',
'May' => 'Maio',
'Jun' => 'Junho',
'Jul' => 'Julho',
'Aug' => 'Agosto',
'Nov' => 'Novembro',
'Sep' => 'Setembro',
'Oct' => 'Outubro',
'Dec' => 'Dezembro'
);
$data = DateTime::createFromFormat('Y-m-d', $time);
return $data->format('d') . ' de ' . $mes_extenso[$data->format('M')] . ' de ' . $data->format('Y');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment