【问题标题】:How to format date in php like August 2020如何在 php 中格式化日期,例如 2020 年 8 月
【发布时间】:2020-08-26 19:48:19
【问题描述】:

我正在尝试在 php laravel 中格式化日期,但我不知道如何以长格式方式格式化它,我知道我可以使用:now()->format('MY') ,但它会产生短月格式 Aug 2020 ,所以我需要获得 August 2020 的方法,那么我怎样才能让它工作呢?

{{ now()->format('M Y') }}

【问题讨论】:

标签: php laravel date


【解决方案1】:

这应该可行。 now()->format('F Y')

我想你需要的一切都在这里... https://www.php.net/manual/en/datetime.format.php

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-06
    • 1970-01-01
    • 2020-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多