Skip to content

Commit 80b276a

Browse files
authored
Update day-of-the-week.py
1 parent 07a9cee commit 80b276a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/day-of-the-week.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ def dayOfTheWeek(self, day, month, year):
1717
month += 12
1818
year -= 1
1919
c, y = divmod(year, 100)
20-
w = (y + y//4 + c//4 - 2*c + 13*(month+1)//5 + day - 1) % 7
20+
w = (c//4 - 2*c + y + y//4 + 13*(month+1)//5 + day - 1) % 7
2121
return DAYS[w]

0 commit comments

Comments
 (0)