[% USE Number.Format(DECIMAL_DIGITS=1); 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|round %]°
Summary:
[% cur.summary %]

Hour

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

Day

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

Week

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

Today

[% today.icon %]
Summary:
[% today.summary %]
Min temperature:
[% today.temperatureMin|round %]° [% time(today.temperatureMinTime) %]
Max temperature:
[% today.temperatureMax|round %]° [% time(today.temperatureMaxTime) %]
Sunrise:
[% time(today.sunriseTime) %]
Sunset:
[% time(today.sunsetTime) %]
[% FOREACH p IN b.predictions %] [% END %]
LineDestinationWhen
[% p.lineName %] [% p.towards %] [% minsec_until(p.expectedArrival) %]
[% FOR h IN hourly.data; BREAK IF loop.last %] [% END %]
[% h.summary %] [% time(h.time) %] [% h.temperature|round %]°
[% FOREACH line IN t.lines %] [% END %]
LineStatusDetails
[% line.name %] [% line.status.statusSeverityDescription %] [% line.status.reason %]