Browse Source

周0改周七

lizhen_gitee 1 year ago
parent
commit
87c0459b0a

+ 9 - 0
application/api/controller/Demo.php

@@ -40,6 +40,15 @@ class Demo extends Api
         })
      */
 
+    public function testweek(){
+        $a = '1704609069';
+        $b = date('w',$a);
+        dump($b);
+        $b = date('N',$a);
+        dump($b);
+
+    }
+
     public function test1(){
         $SnSclient = new SnsClient([
             'profile' => 'default',

+ 1 - 1
application/api/controller/Index.php

@@ -123,7 +123,7 @@ class Index extends Api
             $slot['coach_text'] = substr($coach_text,0,-1);
 
             //组织时间
-            $slot['slot_time'] = date('m月d日',$slot['starttime']).'(周'.date('w',$slot['starttime']).')'.','.date('H:i',$slot['starttime']).'-'.date('H:i',$slot['endtime']);
+            $slot['slot_time'] = date('m月d日',$slot['starttime']).'(周'.date('N',$slot['starttime']).')'.','.date('H:i',$slot['starttime']).'-'.date('H:i',$slot['endtime']);
         }
 
         $this->success(1,$list);

+ 2 - 2
application/api/controller/Lesson.php

@@ -100,7 +100,7 @@ class Lesson extends Api
             $idate = $year.'-'.$month.'-'.$j;
 
             $itime = strtotime($idate);
-            $week = $this->lang == 'en' ? date('D',$itime) : '周'.date('w',$itime);
+            $week = $this->lang == 'en' ? date('D',$itime) : '周'.date('N',$itime);
 
             $i_data = [
                 'yeah' =>$year,
@@ -232,7 +232,7 @@ class Lesson extends Api
         }
 
         //时间
-        $info['slot_time'] = date('m月d日',$info['starttime']).' (周'.date('w',$info['starttime']).')'.','.date('H:i',$info['starttime']).'-'.date('H:i',$info['endtime']);
+        $info['slot_time'] = date('m月d日',$info['starttime']).' (周'.date('N',$info['starttime']).')'.','.date('H:i',$info['starttime']).'-'.date('H:i',$info['endtime']);
 
         //是否有可买配套
         $wait_buy_package = Db::name('lesson_package')

+ 1 - 1
application/api/controller/coach/Lesson.php

@@ -127,7 +127,7 @@ class Lesson extends Apic
             $idate = $year.'-'.$month.'-'.$j;
 
             $itime = strtotime($idate);
-            $week = $this->lang == 'en' ? date('D',$itime) : '周'.date('w',$itime);
+            $week = $this->lang == 'en' ? date('D',$itime) : '周'.date('N',$itime);
 
             $i_data = [
                 'yeah' =>$year,