php -r 'setlocale(LC_ALL, "ru"); echo date("F", time()), "\\n";'
prints "June" in English despite of the fact that I have set Russian locale.
Why does it not work as I need (with Russian month names)?
您需要使用strftime
而不是date
来格式化考虑区域设置的日期。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.