diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 47c487214e4ab38d6166a459732d1cdccae8650c..00c1c0e9a953eb7c8f364f25103fa10b489d74df 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -71,7 +71,7 @@ <%= $result->departure->strftime('%H:%M') %> % if ($result->departure_delay) { - (+<%= $result->departure_delay %>) + (<%= sprintf('%+d', $result->departure_delay) %>) % } diff --git a/templates/history.html.ep b/templates/history.html.ep index c2e6f8823786840784813e7ef6338c928494ce88..af24eedf17aa4d53cafdef0f1551e8968f2ac72a 100644 --- a/templates/history.html.ep +++ b/templates/history.html.ep @@ -47,7 +47,7 @@ % else { <%= $travel->{rt_departure}->strftime('%H:%M') %> % if ($travel->{sched_departure} != $travel->{rt_departure}) { - (+<%= ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60 %>) + (<%= sprintf('%+d', ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60) %>) % } % } @@ -61,7 +61,7 @@ % } else { %= $travel->{rt_arrival}->strftime('%H:%M'); % if ($travel->{sched_arrival} != $travel->{rt_arrival}) { - (+<%= ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60 %>) + (<%= sprintf('%+d', ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60) %>) % } % } % } diff --git a/templates/journey.html.ep b/templates/journey.html.ep index abd9ba8a937e7c850c43ed4150cdf1e61d5637af..e00fdc2f4155eaad89160838b9041ed52f0f5ec5 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -45,7 +45,7 @@ % } % elsif ($journey->{rt_departure} != $journey->{sched_departure}) { %= $journey->{rt_departure}->strftime('%H:%M'); - (+<%= ($journey->{rt_departure}->epoch - $journey->{sched_departure}->epoch) / 60 %>, + (<%= sprintf('%+d', ($journey->{rt_departure}->epoch - $journey->{sched_departure}->epoch) / 60) %>, Plan: <%= $journey->{sched_departure}->strftime('%H:%M'); %>) % } % else { @@ -67,7 +67,7 @@ % } % elsif ($journey->{rt_arrival} != $journey->{sched_arrival}) { %= $journey->{rt_arrival}->strftime('%H:%M'); - (+<%= ($journey->{rt_arrival}->epoch - $journey->{sched_arrival}->epoch) / 60 %>, + (<%= sprintf('%+d', ($journey->{rt_arrival}->epoch - $journey->{sched_arrival}->epoch) / 60) %>, Plan: <%= $journey->{sched_arrival}->strftime('%H:%M'); %>) % } % else {