时间:2021-07-01 10:21:17 帮助过:19人阅读
print_r(between('2012-03-02'));Array
function between($s) {
$t = is_numeric($s) ? $s : strtotime($s);
$w = date('w', $t);
return array(
date('Y-m-d', strtotime("-$w day",$t)),
date('Y-m-d', strtotime((6-$w).' day', $t))
);
}