1
Well I’m using the setlocale
for php to return me the name of the month in PT-BR. The problem is affecting the system calculations. php is putting a comma on the dot link.
setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese');
date_default_timezone_set('America/Sao_Paulo');
echo strftime('%b', strtotime("-1 month"));
echo "<br><br>";
echo 123.33 - 111.11;
In the example I posted he returns to me:
Mai
12,22
Since he has to return me:
Mai
12.22
How do I fix it?
I don’t work with PHP and may be wrong, but looking at documentation I think it’s just changing the
LC_ALL
forLC_TIME
– Leandro Godoy Rosa
Where do these numbers come from? You can use the function $suaVariable=str_replace(",","." ,$suaVariable);
– user60252
I edited the answer of your previous question to remedy this problem see in https://answall.com/questions/210453/fun%C3%A7%C3%A3o-date-returning-m%C3%Aas-en/210456#210456
– user60252