Hello:
I would like to get an output of the date on spanish format.
Thanks
Reading Date in spanish format
what do you have, what do you want?
I'm not familiar with spanish format, little example, please?
For example I
<?php
setlocale("LC_ALL", "SP");
echo "Hoy es ", strftime("%A"), ",", strftime("%d"), "de", strftime("%B");
?>
With that code I get an error message
Warning: Passing locale category name as string is deprecated. Use the LC_* -constants instead.
But I do get the date in spanish.
Instead of Monday I need Lunes. And so on.
Lunes, Marte, Miercoles, Jueves, Viernes, Sabado y Domingo
notice many servers could not support spanish locales. Anyway, spanish locales (at least in unix systems) are named "es_ES" or (like in my system) "es_ES@euro" (with just "es_ES" it doesn't work). Try them or write a little function to translate dates (str_replaceing) so it will be fully compliant to any server.
Originally posted by spighita
Warning: Passing locale category name as string is deprecated. Use the LC_* -constants instead.
In other words, use LC_ALL instead of "LC_ALL".
THAT WAS THE SOLUTION..
THANK YOU..
To further define the error: LC_ALL is a defined constant, while "LC_ALL" is a string.