문제

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)?

도움이 되었습니까?

해결책

You will need to use strftime instead of date to format a date taking into account locale.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top