diff --git a/index.php b/index.php index 12cc29a..2027c1a 100644 --- a/index.php +++ b/index.php @@ -131,10 +131,14 @@ echo "

停留所{$stop} – $stop_name

"; echo '
'; + + $now = intdiv(time(), 60); foreach($json->departures as $bus) { if($bus->actual) { $time = str_replace(" Min", "分", $bus->departure_text); $time = str_replace("Due", "今すぐ", $time); + $minutes = intval($time); + $time .= '
(' . date('H:i', $bus->departure_time) . ')'; } else { $time = date('H:i', $bus->departure_time); }