Information gathering done <?>
This commit is contained in:
parent
48d6bd422e
commit
fd6cd26246
|
@ -122,6 +122,10 @@
|
|||
|
||||
}
|
||||
|
||||
/* (3) Remove last */
|
||||
unset( $col_ind[count($col_ind)-1] );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,13 +136,6 @@
|
|||
/* (1) For each day */
|
||||
foreach($col_ind as $day_n=>$col_x){
|
||||
|
||||
// {1.1} Create the day in events //
|
||||
$this->event[$day_n] = [];
|
||||
|
||||
// {1.2} if inside a course current color, else 0 //
|
||||
$cur_col = 0x0;
|
||||
|
||||
|
||||
/* (2) For each y pixel -> exctract event */
|
||||
for( $y = self::$start_y ; $y < self::$stop_y ; $y++ ){
|
||||
|
||||
|
@ -156,8 +153,10 @@
|
|||
if( !isset($this->event_t[$p1]) )
|
||||
$this->event_t[$p1] = $this->event_t[0]++;
|
||||
|
||||
$uid = $this->event_t[$p1];
|
||||
|
||||
// {3} Store event start //
|
||||
$this->event[$this->event_t[$p1]][$time] = [];
|
||||
$this->event[$uid][$time] = [];
|
||||
|
||||
// {4} Seek end of event //
|
||||
$y++;
|
||||
|
@ -165,7 +164,7 @@
|
|||
$y++;
|
||||
|
||||
// {5} If end reached //
|
||||
$this->event[$this->event_t[$p1]][$time] = $this->yToTime($day_n, $y);
|
||||
$this->event[$uid][$time] = $this->yToTime($day_n, $y);
|
||||
|
||||
}
|
||||
|
||||
|
@ -178,9 +177,6 @@
|
|||
|
||||
}
|
||||
|
||||
var_dump($this->event);
|
||||
|
||||
|
||||
|
||||
die(1);
|
||||
}
|
||||
|
@ -221,7 +217,7 @@
|
|||
$day_ts = strtotime($this->start_d." + $day_n days");
|
||||
|
||||
/* (2) Format it */
|
||||
$day = date('d-m-Y', $day_ts);
|
||||
$day = date('Ymd', $day_ts);
|
||||
|
||||
}
|
||||
|
||||
|
@ -239,7 +235,7 @@
|
|||
$min = round( 60 * ($time-$hour) );
|
||||
|
||||
/* (4) Round minutes to 10min */
|
||||
$min = floor($min/10)*10;
|
||||
$min = round($min/10)*10;
|
||||
|
||||
/* (5) Format to 2-digit */
|
||||
$hour = ( $hour < 10 ) ? "0$hour" : $hour;
|
||||
|
@ -247,9 +243,7 @@
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return "$day $hour:$min:00";
|
||||
return "${day}T$hour${min}00";
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue