-
Notifications
You must be signed in to change notification settings - Fork 129
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
filter: make date-based bounds inclusive instead of exclusive #683
Comments
I guess the python solution would be to use For arguments like |
We already use This change doesn't really cost us anything, but we get a big usability win for the use case James described. Most of our builds rely on An even friendly interface would be if
|
Unless we're truncating from timestamps to dates, I would expect dates to be fixed regardless of TZ. If they're not, I'd consider that a bug. This can happen if dates are treated as timestamps (often at midnight), which they're not. TZ-less dates are how all datetime handling libraries I've seen work (including Python's Regarding date ranges, we could consider a different argument and syntax so as 1) to leave the choice of inclusiveness to the user and 2) to not affect backwards compat. For example:
I agree with John that even a few relative specifiers would be nice and are not exclusive with any other changes to date filters. |
agreed on all counts. Dates should be fixed regardless of time zone. But there is always going to be some ambiguity. Since we aren't keeping track of TZ, the result of that aside, most people probably expect the behavior: and if this is explicit in the help that is probably the best quick solution. |
Agreed re: best quick solution and expected behaviour. |
@benjaminotter This issue's description reflects the consensus outcome from the conversation above that we should initially use inclusive dates and document these clearly in the help. There are a couple of other proposals in the conversation about that may be interesting for you to consider, but none of these have been formally discussed or refined beyond this conversation. |
Current Behavior
Filtering by min or max date excludes records whose date exactly matches the given bounds.
Expected behavior
The "max date" filter should include records up to and including that latest date. The "min date" filter should behave the same way, for consistency.
Possible solution
<
to<=
for max date).help
text for the--min-date
and--max-date
flags to clearly document that these dates are inclusiveAdditional context
This issue arose as during analysis in the ncov workflow.
The proposed solution will require a new major release of Augur, since this change affects the public command line interface.
The text was updated successfully, but these errors were encountered: