Skip to content

Commit c9953bb

Browse files
Fix datetime import alias in Zeller’s congruence (#15547)
* fix(maths): use conventional datetime alias in Zeller's congruence * from datetime import date Replaced datetime module alias with direct import for clarity. --------- Co-authored-by: Christian Clauss <cclauss@me.com>
1 parent 215c1f0 commit c9953bb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎maths/zellers_congruence.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import argparse
2-
import datetime
2+
from datetime import date
33

44

55
def zeller(date_input: str) -> str:
@@ -119,8 +119,8 @@ def zeller(date_input: str) -> str:
119119
"Year out of range. There has to be some sort of limit...right?"
120120
)
121121

122-
# Get datetime obj for validation
123-
dt_ck = datetime.date(int(y), int(m), int(d))
122+
# Get date obj for validation
123+
dt_ck = date(int(y), int(m), int(d))
124124

125125
# Start math
126126
if m <= 2:

0 commit comments

Comments
 (0)