PHP 日期时间处理汇总

文章目录

    解析字符串中的日期

    $date = DateTime::createFromFormat('j-M-Y', '15-Feb-2009');
    echo $date->format('Y-m-d');