On 12-Feb-2004 André Cerqueira wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> i had problems with locale
> i think its safer to make a dayname and monthname array, and use
> getdate(), than build the string yourself
> 

<snip>

> 
> //the follow should, but doesnt seem to work
> //setlocale(LC_ALL, 'pt_BR');
> //echo date('l, j de F de Y');
> ?>

date() doesn't format according to locale but strftime() does:

setlocale(LC_ALL, 'pt_BR.ISO8859-1');
echo strftime('%A, %B %e %Y');

// output 'Quinta Feira, Fevereiro 12 2004'



-- 
Don Read                                     [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to