I clarify that although I am in a PHP environment with Eloquent-ORM and using Carbon to handle dates on the server side, I am NOT using Laravel. I want to show a date in Spanish using Carbon, but I can't get it to show in that language, I have this:
use Carbon\Carbon;
Carbon::setLocale("es");
$fechaCarbon = Carbon::parse($miEgreso->created_at)->toDayDateTimeString();
I have also tried:
$fechaCarbon = Carbon::parse($miEgreso->created_at)->locale("es")->toDayDateTimeString();
In both cases I get something like:
"Mon, Jan 4, 2021 4:53 PM"
When I expect to get:
"Mon, Jan 4, 2021 4:53 PM"
Or something similar where it is interpreted that the expression is in Spanish.