1
我有一個字符串,如「2013-05-07」 ,我想通過任何功能方式(如果可用)或簡稱爲「2013年5月7日」方法儘可能如何將PHP日期字符串轉換爲其他格式
我有一個字符串,如「2013-05-07」 ,我想通過任何功能方式(如果可用)或簡稱爲「2013年5月7日」方法儘可能如何將PHP日期字符串轉換爲其他格式
$dt = new DateTime('2013-05-07');
echo $dt->format('j F Y');
作爲PHP 5.4的
echo (new DateTime('2013-05-07'))->format('j F Y');
echo date('j F Y', strtotime("2013-05-07"));