diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-20 17:50:14 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-20 17:50:14 +0100 |
commit | 2e1cf302316d129837a7bb37ec67c77cac8820ef (patch) | |
tree | 5fe413313c30a096e471da80e814a63a4c9fd73c /templates/history.html.ep | |
parent | 0226713c1d1839f2ffac41a1000180c0089afe9d (diff) |
Show negative delay as "-X", not "+-X"
Diffstat (limited to 'templates/history.html.ep')
-rw-r--r-- | templates/history.html.ep | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/history.html.ep b/templates/history.html.ep index c2e6f88..af24eed 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) %>) % } % } </td> @@ -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) %>) % } % } % } |