From 7bb886f99da578cb1566ed0a08a6b12879b1d051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dembowski?= Date: Fri, 1 Oct 2021 21:11:41 +0000 Subject: [PATCH] Update events.js --- locale/_/events.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/locale/_/events.js b/locale/_/events.js index 8766ad7fb..497d9deab 100644 --- a/locale/_/events.js +++ b/locale/_/events.js @@ -209,4 +209,18 @@ module.exports = [ } yield* weeks[2]; }), EventLevel.Week), + + + new Event('hate_crime_awareness_week', null, 10, function* (monthDays) { + let saturdays = 0; + for (let d of monthDays) { + if (d.dayOfWeek === 6) { + saturdays++; + } + if (saturdays === 2 || (saturdays === 3 && d.dayOfWeek === 6)) { + yield d; + } + } + }, EventLevel.Week), + ];