Skip to content

Commit

Permalink
Fix #1 - remove strange < 12 and < 12 logic
Browse files Browse the repository at this point in the history
This results in datefmt="auto" only force-changing the date
format when we know for a fact it is wrong
i.e. month > 12
  • Loading branch information
Kent Inverarity committed Nov 30, 2023
1 parent 635a229 commit bc2549d
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 bc2549d

Please sign in to comment.