duanchi4544 2009-11-11 08:00
浏览 24
已采纳

为什么会有所不同?

echo date("w",strtotime(date("Y-m-d")));
echo date("w",strtotime(date("Y年m月d日")));

Save it as utf8.You'll see the second is bigger than the first one.

  • 写回答

4条回答 默认 最新

  • doufan1363 2009-11-11 08:05
    关注

    Mask,

    most probably because strtotime is not able to parse properly the japanese formated date.

    In my opinion, by reading the documentation it would accept date formated with - but that's not explicitly said.

    trying var_dump(strtotime(date("Y年m月d日")); give false so like in the documentation the strtotime seems to fail to parse it.

    so date apply on false which don't give the same result.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?