[% cur = f.currently; today = f.daily.data.0; today_start = f.hourly.data.0.time.clone today_stop = f.hourly.data.0.time.clone.add('days'=>1); hourly = f.hourly.slice('from', today_start, 'to', today_stop); MACRO hours_length(span) BLOCK; d=span.stop_time.subtract_datetime(span.start_time); format_duration( 'pattern','%k', 'base',span.start_time, 'normalize',1).format_duration(d); END; MACRO time(d) BLOCK; d.clone.set_time_zone('Europe/London').strftime('%H:%M'); END; MACRO minsec_until(d) BLOCK; dur=d.subtract_datetime(now); format_duration( 'pattern','%M:%S', 'base',now, 'normalize',1).format_duration(dur); END; -%] Forecast

Currently

[% cur.icon %]
Temperature:
[% cur.temperature %]°
Summary:
[% cur.summary %]

Next hour

[% f.minutely.icon %]
Summary:
[% f.minutely.summary %]

Next 24 hours

[% hourly.icon %]
Summary:
[% hourly.summary %]

Next 7 days

[% f.daily.icon %]
Summary:
[% f.daily.summary %]
[% today.icon %]
Summary:
[% today.summary %]
Min temperature:
[% today.temperatureMin %]° [% time(today.temperatureMinTime) %]
Max temperature:
[% today.temperatureMax %]° [% time(today.temperatureMaxTime) %]
Sunrise:
[% time(today.sunriseTime) %]
Sunset:
[% time(today.sunsetTime) %]
[% left=0 ;FOR span IN hourly.spans_by_string('summary'); width=3*hours_length(span) %] [% span.value %] [% left=left+width; END %]
[% left=0; FOR h IN hourly.data; BREAK IF loop.last %] [% time(h.time) %] [% left=left+3; END %]
[% left=0; FOR h IN hourly.data; BREAK IF loop.last %] [% h.temperature %]° [% left=left+3; END %]
[% FOREACH p IN b.Prediction %] [% END %]
LineDestinationWhen
[% p.LineName %] [% p.DestinationText %] [% minsec_until(p.EstimatedTime) %]