![](/img/trans.png)
[英]how get month and year of date now like August2020 using laravel?
[英]How to format date in php like August 2020
我正在嘗試在 php laravel 中格式化日期,但我不知道如何以長格式方式對其進行格式化,我知道我可以使用: now()->format('M Y') ,但它會產生短月格式2020 年 8 月,所以我需要獲得2020 年 8 月的方法,那么我怎樣才能讓它發揮作用呢?
{{ now()->format('M Y') }}
這應該有效。 now()->format('F Y')
我認為你需要的一切都在這里...... https://www.php.net/manual/en/datetime.format.php
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.