获取上周一周的日期
                                                        
                                
                                10230次阅读
                            
                            
                                
                                305人点赞
                            
                            
                            
                                
                                发布时间: 2022-06-22 16:16:49
                            
                        
                        
                            
                                
                                扫码到手机查看
                                
                                    ![]() 
                                
                            
                        
                    $start1 = date("Y-m-d", strtotime('monday last week'));
$end1   = date("Y-m-d", strtotime('monday this week - 1 days'));
$start2 = date("Y-m-d", strtotime('monday -3 week'));
$end2   = date("Y-m-d", strtotime('monday -2 week - 1 days'));
$start3 = date("Y-m-d", strtotime('monday -4 week'));
$end3   = date("Y-m-d", strtotime('monday -3 week - 1 days'));
$start4 = date("Y-m-d", strtotime('monday -5 week'));
$end4   = date("Y-m-d", strtotime('monday -4 week - 1 days'));
echo " 1: $start4\n";
echo " : $end4\n";
die;
上个月:
$start = date(“Ym01”, strtotime(“last month”));
$end = date(“Ym01”);获取上周周天日期:
 $sunday = date("Y-m-d", strtotime('sunday last week')); 
                     
                     
                     
                     
                     
                     
                     
             
             
             目录
        目录