duandao8607 2013-11-19 17:29
浏览 11

我想用PHP显示我的语言的当前日期[复制]

This question already has an answer here:

I am using this PHP Function, which is working great:

<?php echo date('l, d F Y'); ?>

Today, it outputs Tuesday, 19 November 2013, but I want it to be in my language. Is there a way I can set variables for each day of the week, and each month of the year, in my language?

Thanks.

</div>
  • 写回答

2条回答 默认 最新

  • douqian1517 2013-11-19 17:31
    关注

    From the docs:

    To format dates in other languages, you should use the setlocale() and strftime() functions instead of date().

    评论

报告相同问题?