[英]Convert yyyy-mm-dd hh:mm:ss to dayoftheweek, dd of monthname yyyy
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其中输出 5 of May 2013
How can I get the name of the day of the week?如何获得星期几的名称?
Using date of 2005-05-12:使用日期2005-05-12:
echo date("l", mktime(0, 0, 0, 5, 12, 2005));
you'd get 'Thursday'.你会得到“星期四”。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.