I have a DateTime object that I am currently generating with
$mytime->format("D dmY")
Which gives me exactly the format I need:
Tuesday 5.3.2012
The only missing point is the correct language. I need a German translation of Tue ( Tuesday ), which is Die ( Dienstag ).
This gives me the correct locale setting
Locale::getDefault()
But I do not know how to tell DateTime::format use it.
Is there no way to do something like:
$mytime->format("D dmY", \Locale::getDefault());
php datetime-format
stoefln Jan 05 2018-12-12T00: 00Z
source share