From b5d6b97becbf7a78cfd59dc78a575e9ebb197459 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Fri, 17 Sep 2021 00:23:17 +0200 Subject: [PATCH] [calendar][en] add events --- locale/en/events.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/locale/en/events.js b/locale/en/events.js index eb8c274d8..d099276b1 100644 --- a/locale/en/events.js +++ b/locale/en/events.js @@ -17,4 +17,27 @@ module.exports = [ new Event('Marriage Equality Day (Australia)', null, 12, day(9), EventLevel.MajorDay), new Event('Marriage Equality Day (New Zealand)', null, 8, day(19), EventLevel.MajorDay), new Event('Marriage Referendum Anniversary (Ireland)', null, 5, day(22), EventLevel.MajorDay), + + new Event('Wear it Purple Day (Australia)', null, 8, function* (monthDays) { + let lastFriday = null; + for (let d of monthDays) { + if (d.dayOfWeek === 5) { + lastFriday = d; + } + } + yield lastFriday; + }, EventLevel.MajorDay), + + new Event('Spirit Day', null, 10, function* (monthDays) { + let fridays = 0; + for (let d of monthDays) { + if (d.dayOfWeek === 5) { + fridays++; + if (fridays === 3) { + yield d; + return; + } + } + } + }, EventLevel.MajorDay), ];