/** * 时间转时间 * @param type $date * @param type $f * @return type */ function dateToDate($date, $f = 'Y-m-d') { if ($date > 0) { if (strlen($date) == 10) { return date($f, $date); } if (strlen($date) == 13) { $date = substr($date, 0, 10); return date($f, $date); } } return date($f, strtotime($date)); }
关键字词: