Format date in PHP [duplicate]

4

I need to show date in PHP in the following format: "Sunday, December 09, 2014"?

It has to be in Brazil time! If possible in Portuguese too!



EDIT :

<?php 
setlocale( LC_ALL, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8', 'portuguese' ); 
date_default_timezone_set( 'America/Sao_Paulo' );
echo strftime( '%A, %d de %B de %Y', strtotime('today')); 
?>

Detail is that the result is "Tuesday" and not "Tuesday", wanted to know how to take the fair, is it possible?

    
asked by anonymous 12.08.2014 / 21:14

1 answer

5

Here it worked.

<?php

setlocale(LC_ALL, "pt_BR", "pt_BR.iso-8859-1", "pt_BR.utf-8", "portuguese");
date_default_timezone_set("America/Sao_Paulo");
print strftime("%A, %d de %B de %Y");

?>

output

terça, 12 de agosto de 2014
    
12.08.2014 / 21:26