Reputation: 20163
I almost have this by
$this->fecha = '2013 05-05 05:55:05'
$yearvalue = date("Y", strtotime($this->fecha) );
$monthname = date("F", strtotime($this->fecha) );
$dayvalue = date("d", strtotime($this->fecha) );
$printFecha = "$dayvalue of $monthname $yearvalue";
Which outputs 5 of May 2013
How can I get the name of the day of the week?
Upvotes: 0
Views: 424
Reputation: 5903
You can do it like this,
echo date('l j \of F Y', $this->date);
Your output will be something like this
Sunday 5 of May 2013
Upvotes: 1
Reputation: 7778
Using date of 2005-05-12:
echo date("l", mktime(0, 0, 0, 5, 12, 2005));
you'd get 'Thursday'.
Upvotes: 1