Skip to content

Commit 29f6e18

Browse files
committed
Handle ETHBerlin case
1 parent d3b6b89 commit 29f6e18

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

data/24/events/ethberlin/index.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ date = "2024-05-24"
3838
days = 3
3939

4040
# the event times (shows up in the event card)
41-
times = "00:00-24:00"
41+
times = "00:00-23:59"
4242

4343
# Link to venues from the Places table - use this OR enter venueName, venueUrl and venueAddress
4444
venues = ["cic"]

utils/engine.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,34 @@ class DeConf_Collection {
220220
// add Event Segments
221221
if (!data.index.segments) {
222222
data.index.segments = [];
223-
for (let i = 0; i < data.index.days; i++) {
224-
data.index.segments.push({
225-
date: format(addDays(new Date(data.index.date), i), "yyyy-MM-dd"),
226-
times: data.index.times || "09:00-18:00",
227-
});
223+
// Set ETHBErlin times manually
224+
if (data.index.shortname === "ETHBerlin") {
225+
data.index.segments = [
226+
{
227+
date: "2024-05-24",
228+
times: "12:00-23:59",
229+
},
230+
{
231+
date: "2024-05-25",
232+
times: "00:00-23:59",
233+
},
234+
{
235+
date: "2024-05-26",
236+
times: "00:00-20:00",
237+
},
238+
];
239+
} else {
240+
// All other events
241+
for (let i = 0; i < data.index.days; i++) {
242+
data.index.segments.push({
243+
date: format(addDays(new Date(data.index.date), i), "yyyy-MM-dd"),
244+
times: data.index.times || "09:00-18:00",
245+
});
246+
}
228247
}
229248
}
249+
250+
// Add full start and end Dates
230251
for (const sg of data.index.segments) {
231252
if (sg.remote) {
232253
continue;

0 commit comments

Comments
 (0)