From 090af1edf20edb70667dd8c8b23e7cfa8787bde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dembowski?= Date: Mon, 15 Aug 2022 19:07:36 +0000 Subject: [PATCH 1/2] Update events.js + transition week --- locale/_/calendar/events.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/locale/_/calendar/events.js b/locale/_/calendar/events.js index 8c4402849..239305ef6 100644 --- a/locale/_/calendar/events.js +++ b/locale/_/calendar/events.js @@ -332,6 +332,24 @@ module.exports = [ } }, EventLevel.Day), + // last full week (Monday - Friday) in January + new Event('transition_week', 'Transgender', 1, function* (monthDays) { + let lastFullWeek = []; + let currentWeek = []; + for (let d of monthDays) { + if (d.dayOfWeek === 1) { + lastFullWeek = currentWeek; + currentWeek = []; + } + if (d.dayOfWeek >= 1 && d.dayOfWeek <= 5) { + currentWeek.push(d); + } + } + yield* currentWeek.length === 5 + ? currentWeek + : lastFullWeek; + }, EventLevel.Week), + // --- one-off events --- new Event('deaf_awareness_week', 'Progress Pride', 4, function* (monthDays) { for (let d of monthDays) { From 34c9c0be7273c9873100587bc5fa2629cced3dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dembowski?= Date: Mon, 15 Aug 2022 19:07:52 +0000 Subject: [PATCH 2/2] [en] Update events.js - moving transition week to main calendar --- locale/en/calendar/events.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/locale/en/calendar/events.js b/locale/en/calendar/events.js index d8581f60f..90cea3ecb 100644 --- a/locale/en/calendar/events.js +++ b/locale/en/calendar/events.js @@ -231,23 +231,6 @@ module.exports = [ } }, EventLevel.Day, [], null, 'Paush 6 / पौष ६'), - // last full week (Monday - Friday) in January - new Event('{https://nationaltransitionweek.wordpress.com/=Transition Week}', 'Transgender', 1, function* (monthDays) { - let lastFullWeek = []; - let currentWeek = []; - for (let d of monthDays) { - if (d.dayOfWeek === 1) { - lastFullWeek = currentWeek; - currentWeek = []; - } - if (d.dayOfWeek >= 1 && d.dayOfWeek <= 5) { - currentWeek.push(d); - } - } - yield* currentWeek.length === 5 - ? currentWeek - : lastFullWeek; - }, EventLevel.Week), // one-off events new Event('Day of Silence', null, 4, dayYear(23, 2021), EventLevel.Day),