Skip to content

Commit d0bbe05

Browse files
authored
Fixes fraction of hours on events (#92)
1 parent 7161202 commit d0bbe05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_data/events.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
- title: "Working With Open Source: A roundtable for PhD students and early-career researchers"
3434
organiser: UCL Centre for Digital Humanities
3535
url: https://forms.cloud.microsoft/e/Gi72LxrjN7
36-
time: 2026-02-12
36+
date: 2026-02-12
3737
time: "14:00"
3838
duration:
3939
hours: 1.5

_includes/event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h3><a href="{{ event.url }}">{{ event.title }}</a></h3>
1111
{% capture start_time %}{{ event.date| date: "%Y-%m-%d" | append: "T" | append: event.time | append: ":00"}}{% endcapture %}
1212
🕐 {{ start_time | date: "%H:%M" }}
1313
{% if event.duration.hours %}
14-
{% capture seconds %}{{ 3600 | times: event.duration.hours }}{% endcapture %}
14+
{% capture seconds %}{{ 3600 | times: event.duration.hours | floor }}{% endcapture %}
1515
&ndash; {{ start_time | date: "%s" | plus: seconds | date: "%H:%M"}}
1616
{% endif %}
1717
<br/>

0 commit comments

Comments
 (0)