[calendar] black_queer_week

This commit is contained in:
Avris 2021-09-19 19:02:44 +02:00
parent b6a767f829
commit 41bc75cf0c
1 changed files with 14 additions and 0 deletions

View File

@ -194,4 +194,18 @@ module.exports = [
} }
} }
}, EventLevel.MajorDay), }, EventLevel.MajorDay),
new Event('black_queer_week', 'Progress Pride', 2, week(function* (monthDays) {
const weeks = [];
for (let d of monthDays) {
if (d.dayOfWeek === 1) {
weeks.push([]);
}
if (weeks.length === 0) {
continue;
}
weeks[weeks.length - 1].push(d);
}
yield* weeks[2];
}), EventLevel.Week),
]; ];