I have the following code:
<?php $date = new DateTime($uh->updated_at); echo $date->format('d/M/Y'); ?>
I need to generate the date, based on the value of a variable. And that this is generated in Spanish. I tried the following, but I could not pass as an argument the date I want.
<?php setlocale(LC_ALL,"es_ES"); echo strftime("%A %d de %B del %Y"); ?>
How can I pass a variable with a dynamic date and that it be printed in Spanish?