From 79a01e80ece68d6f81e19e27454898d5acd5b489 Mon Sep 17 00:00:00 2001 From: AdenChiu22 <142437577+AdenChiu22@users.noreply.github.com> Date: Tue, 30 Apr 2024 00:07:45 -0700 Subject: [PATCH] Update APCalendar.java --- src/main/java/APCalendar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/APCalendar.java b/src/main/java/APCalendar.java index 6d2ba93..346292f 100644 --- a/src/main/java/APCalendar.java +++ b/src/main/java/APCalendar.java @@ -55,7 +55,7 @@ private static int dayOfYear(int month, int day, int year) */ public static int dayOfWeek(int month, int day, int year) { - int additionalDays = dayOfYear(month, day, year) - 1; + int additionalDays = dayOfYear(month, day, year) - firstDayOfYear(year); return (firstDayOfYear(year) + additionalDays) % 7; } }