PHP date() in foreign languages - e.g. Mar 25 Aoû 09

后端 未结 4 1526
小蘑菇
小蘑菇 2020-11-29 06:47

I have a script that needs to display date data to an international audience - e.g.

\"submitted Tue 25 Aug 09\"

Is there an easi

4条回答
  •  执笔经年
    2020-11-29 07:04

    I think that the best way to do it with strftime and setlocale functions. But it will not work if your server has no needed locale installed (in current questions it is fr_FR).

    Code bellow throw an exception if locale change will be unsuccessful

提交回复
热议问题