Laravel Carbon获取 某个时间后N个月的时间

        $time = "2020-11-20 00:00:00";
        $res = (new Carbon)->setTimeFromTimeString($time)->addMonths(-10)->toDateTimeString();
        

 

posted @ 2019-08-15 20:58  Skrillex  阅读(806)  评论(0编辑  收藏  举报

power by Skrillex 2008