Skip to content

Commit 1b4c74c

Browse files
authored
Update doomsday.py
1 parent 2297ca5 commit 1b4c74c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

other/doomsday.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/python3
2-
# For more information on the doomsday algorithm please see: https://en.wikipedia.org/wiki/Doomsday_rule
2+
# For more information on the doomsday algorithm
3+
# please see: https://en.wikipedia.org/wiki/Doomsday_rule
34

45
_doomsday_leap = [4, 1, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
56
_doomsday_not_leap = [3, 7, 7, 4, 2, 6, 4, 1, 5, 3, 7, 5]
@@ -24,9 +25,9 @@ def get_week_day(year: int, month: int, day: int) -> str:
2425
2526
"""
2627
# minimal input check:
27-
assert len(str(year)) > 2, "Please supply year in YYYY format"
28-
assert 1 <= month <= 12, "Invalid month value, please give a number between 1 to 12"
29-
assert 1 <= day <= 31, "Invalid day value, please give a number between 1 to 31"
28+
assert len(str(year)) > 2, "year should be in YYYY format"
29+
assert 1 <= month <= 12, "month should be between 1 to 12"
30+
assert 1 <= day <= 31, "day should be between 1 to 31"
3031

3132
# Doomsday algorithm:
3233
century = year // 100

0 commit comments

Comments
 (0)