我有一个当天的日期时间.我需要获得两个unix时间戳的开始和本周的结束.我如何使用dateperiod或dateinterval类?
$now = time(); $beginning_of_week = strtotime('last Monday',$now); // Gives you the time at the BEGINNING of the week $end_of_week = strtotime('next Sunday',$now) + 86400; // Gives you the time at the END of the last day of the week