Skip to content

Commit

Permalink
Merge pull request #2 from dew-waterscience/issue1-broken-datefmt-auto
Browse files Browse the repository at this point in the history
Fix #1 - remove strange < 12 and < 12 logic
  • Loading branch information
kinverarity1 committed Nov 30, 2023
2 parents 635a229 + bc2549d commit 347fb82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions korexo_profile/korexo.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def _read_korexo_format(fn, encoding, parse_dts=True, datefmt="auto"):
datefmt = "%d/%m/%Y"
elif unitfmt == "DD/MM/YYYY" and int(second) > 12:
datefmt = "%m/%d/%Y"
elif int(first) <= 12 and int(second) <= 12:
if unitfmt == "MM/DD/YYYY" and second.startswith("0"):
datefmt = "%d/%m/%Y"
# elif int(first) <= 12 and int(second) <= 12:
# if unitfmt == "MM/DD/YYYY" and second.startswith("0"):
# datefmt = "%d/%m/%Y"
else:
pass
try:
Expand Down

0 comments on commit 347fb82

Please sign in to comment.