【发布时间】:2020-08-26 19:48:19
【问题描述】:
我正在尝试在 php laravel 中格式化日期,但我不知道如何以长格式方式格式化它,我知道我可以使用:now()->format('MY') ,但它会产生短月格式 Aug 2020 ,所以我需要获得 August 2020 的方法,那么我怎样才能让它工作呢?
{{ now()->format('M Y') }}
【问题讨论】:
-
碳文档:Common Formats
-
用于格式化日期的基本 PHP 文档在这里 php.net/manual/en/datetime.formats.date.php 看看,你会得到答案。