(new Carbon('xxxx-xx-xx'))->toDateString(); //不传参为当前日期 2021-04-13 carbon()内可以为时间戳
(new Carbon('xxxx-xx-xx'))->toDateTimeString(); //不传参为当前日期 2021-04-13 14:13:45
(new Carbon('2021-03-04'))->toDateTimeString()->getTimestamp(); //不传参为当前日期 获取时间戳
(new Carbon('2021-03-04'))->startOfMonth()->format('Y-m-d'); //获取指定时间月初 2021-03-01
(new Carbon('2021-03-04'))->startOfMonth()->getTimestamp(); //获取月初时间戳
(new Carbon())->subMonth()->startOfMonth()->format('Y-m-d'); //当前时间上个月月初时间
(new Carbon())->subDay('3')->format('Y-m-d'); //当前时间前三天
(new Carbon())->addDay('3')->format('Y-m-d')->diffForHumans(); //友好化时间