Skip to content

Commit

Permalink
Also work for YYYY-MM-DD
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Sep 27, 2024
1 parent 9fa7dd8 commit f81a32b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/python/nexus_nei2019_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def link_file(src_file, tgt_file):
parser.add_argument(
"-d",
"--date",
help=r"date for file: format YYYYMMDD",
help=r"date for file: format YYYYMMDD or YYYY-MM-DD",
required=False,
)
parser.add_argument(
Expand Down Expand Up @@ -135,7 +135,7 @@ def link_file(src_file, tgt_file):
hemco_time_file = args.time_file_path
dates = get_hemco_simulation_time(hemco_time_file)
elif args.date is not None:
d = datetime.strptime(args.date, r"%Y%m%d")
d = datetime.strptime(args.date.replace("-", ""), r"%Y%m%d")
dates = [d]
else:
print("error: date info not specified")
Expand Down

0 comments on commit f81a32b

Please sign in to comment.