Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DateTime format full month not as documented

Trying to output the full month name using DateTime object but somehow I'm not interpet documentation show here .

I want the date out put a date like 18 November 2012 but Im not sucseeding

$date = new DateTime();
$datum =  $date->format("d m Y");

outputs 18 11 2012 ??

reading on this format dd ([ \t.-])* m ([ \t.-])* y should output correct but this does not work at all ??

like image 274
Alex Avatar asked Dec 15 '22 17:12

Alex


1 Answers

For the formatting characters, see the date() manual page. This is referred to several times on the DateTime::format() manual page.

For the full month name you want to use the formatting character F.

A full textual representation of a month, such as January or March


The "Date Formats" manual page that you linked to is for the input date string, not the output format.

like image 116
salathe Avatar answered Dec 26 '22 21:12

salathe