Refined algorithm used for the index generation + added some explaination

This commit is contained in:
DL6ER
2016-11-09 15:54:41 +01:00
parent eda94507b4
commit ff85963df4
+8 -1
View File
@@ -273,7 +273,14 @@
$hour = $time->format('G');
$minute = $time->format('i');
$time = $minute/6 + 6*$hour;
// 00:00 - 00:09 -> 0
// 00:10 - 00:19 -> 1
// ...
// 12:00 - 12:10 -> 72
// ...
// 15:30 - 15:39 -> 93
// etc.
$time = ($minute-$minute%10)/10 + 6*$hour;
if (isset($byTime[$time])) {
$byTime[$time]++;