-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation page on supported date formats #882
Comments
Copied text from https://github.com/nextstrain/augur/blob/c264580153afd99ebd3816023980bdc9c040e141/augur/dates.py#L8-L10 In the future, this should point to a document in Augur (see nextstrain/augur#882)
Copied text from https://github.com/nextstrain/augur/blob/c264580153afd99ebd3816023980bdc9c040e141/augur/dates.py#L8-L10 In the future, this should point to a document in Augur (see nextstrain/augur#882)
This is a great idea! We should also consider linking out to examples of ISO 8601 dates, since users may not be familiar with this term (or will not know that they know the associated formats). Linking to the ISO 8601 calendar dates and durations sections on wikipedia would be fine for this. |
Do we want to also support and document the following formats?
Fauna's format_date function seems to process it, but I assume it will be superseded by augur's version. I could also see dropping any parenthetical strings "\s(\S.*)" as a pre-processing step and outside the scope. |
@j23414 yeah, that would be The current support for those isn't in dates.py, but rather a hidden feature of augur filter's subsampling logic which only applies to the metadata Line 935 in 8014186
As a path to follow, we should aim to support the same date formats across different use cases via functions in dates.py. |
One way to think about incomplete dates like |
#740 improves the help text for
filter
's--min-date
/--max-date
. Similar documentation should also be provided for metadata dates, which is slightly different (e.g. no support for relative dates). Moving some things over from an old wiki page as a starter:Overview
Augur supports a variety of date formats:
2018
- Year only2018.23
- Numerical (floating point)2018-03
- Year, month (positive only)2018-03-25
- Year, month, day (ISO 8601 date) (positive only)2018-03-XX
- Year, month, ambiguous day (positive only)2018-XX-XX
- Year, ambiguous month, ambiguous day (positive only)Generally, this comes down to flavors of numerical or (potentially incomplete) ISO dates.
Implementation
Internally, Augur stores dates in numerical format for the following reasons:
Related discussions
The text was updated successfully, but these errors were encountered: