Skip to content

Commit

Permalink
Mention that 'XX' can be used in date format
Browse files Browse the repository at this point in the history
This is worth calling out because it would be reasonable for a user to
assume that Augur's support XX is automatically applied to dates like
%Y-%m-%d. The added explicit mention + existing list of builtin formats
including XX explicitly should help avoid that assumption.

Co-authored-by: Thomas Sibley <tsibley@fredhutch.org>
  • Loading branch information
victorlin and tsibley committed Jan 14, 2025
1 parent 5555d65 commit c34a10e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions augur/curate/format_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def register_parser(parent_subparsers):
format codes available at
<https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes>.
If a value matches multiple formats, it will be parsed using the first match.
Use 'XX' to match masked parts of the date (e.g. '%%m/XX/%%Y').
The following formats are builtin and automatically used:
{", ".join(repr(x).replace("%", "%%") for x in BUILTIN_DATE_FORMATS)}.
User-provided values are considered after the builtin formats."""))
Expand Down

0 comments on commit c34a10e

Please sign in to comment.