![](/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.