From ff68d30a8e96528d9981663693a929a1a625a4c1 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sun, 14 Feb 2021 21:47:21 +0100 Subject: [PATCH] Fix WeekdayInMonth holiday shouldCelebrate not checking for current month --- Content.Server/Holiday/ShouldCelebrate/WeekdayInMonth.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Server/Holiday/ShouldCelebrate/WeekdayInMonth.cs b/Content.Server/Holiday/ShouldCelebrate/WeekdayInMonth.cs index 8bd2915f58..660bdb4bc6 100644 --- a/Content.Server/Holiday/ShouldCelebrate/WeekdayInMonth.cs +++ b/Content.Server/Holiday/ShouldCelebrate/WeekdayInMonth.cs @@ -22,6 +22,10 @@ namespace Content.Server.Holiday.ShouldCelebrate public override bool ShouldCelebrate(DateTime date, HolidayPrototype holiday) { + // Not the needed month. + if (date.Month != (int) holiday.BeginMonth) + return false; + // Occurrence NEEDS to be between 1 and 4. _occurrence = Math.Max(1, Math.Min(_occurrence, 4));