Skip to content

Commit

Permalink
Update APCalendar.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AdenChiu22 authored Apr 30, 2024
1 parent 6ca9842 commit 79a01e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/APCalendar.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 79a01e8

Please sign in to comment.