求一个
$week = date('W');
function($year,$week) return 星期一的时间;
同时求解
date("W",strtotime('2011-1-1')) 为何 不是 1
date("W",strtotime('2013-1-1')) 为何是 1
求一个
$week = date('W');
function($year,$week) return 星期一的时间;
同时求解
date("W",strtotime('2011-1-1')) 为何 不是 1
date("W",strtotime('2013-1-1')) 为何是 1
4 回答14k 阅读✓ 已解决
5 回答8.3k 阅读✓ 已解决
1 回答3.7k 阅读✓ 已解决
3 回答1.6k 阅读✓ 已解决
2 回答2k 阅读✓ 已解决
1 回答1.3k 阅读✓ 已解决
2 回答2k 阅读
W是显示第几周,从星期一开始的说。2011年1月1号是礼拜六,不算是第1周的说,2013年1月1号是礼拜二,当然是第1周啦~

另外,你想要返回某一周的礼拜一直接用
就可以了,具体可以看看strtotime,官方手册上有详细说明