📌  相关文章
📜  laravel carbon 无法解析 '28 09 2021, 12:00:00 pm':DateTime::__construct(): 无法解析位置 0 的时间字符串(28 09 2021, 12:00:00 pm)(2):意外字符 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:20.126000             🧑  作者: Mango

代码示例1
Because Carbon does not understand d/m/Y format out of the box. If you use 
slashes it should be mm/dd/yyyy in that case. d/m/Y is not an official date 
format.

You can use :
{{ Carbon\Carbon::createFromFormat('d/m/Y', $holiday->holiday_date)->format('d-m-Y') }}