-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Discussion] Best way to define date ranges? #103
Comments
Hi, first of congrats on 0.3 release! Regarding time spans, imho, the most important feature is that there is inclusive start and exclusive end. There is longer explanation for this in #78 (comment). Selecting actual words is really difficult because understanding of the meaning of terms varies even between native English speakers. One cool way to solve the problem would be implementing translation mechanism for commands. Overall, I will have more time to work with Abandon during end of nothern hemispere autumn and during winter. There have been lots of cool stuff happening with Abandon during summer! |
@hrj @jaa127 yeah, current implementation with exclusive dates doesn't make much sense. Making both dates inclusive would be more user-friendly. Not quite sure what the ending date should be, inclusive or exclusive. I guess what @jaa127 is suggesting looks similar to what ledger is doing - http://ledger-cli.org/3.0/doc/ledger3.html#Period-Expressions |
Thanks for your inputs! Considering everything, I am going with explicitness and flexibility, even if it increases verbosity a bit. Instead of the current syntax of I will implement the changes now. @jaa127 We should definitely have a mechanism for translations in Abandon. |
@hrj Another idea of defining date ranges is to use math: |
@Entea Yeah, that's a good idea too. But if I am not in maths context, I sometimes can't remember which bracket has what meaning. The support for inclusive / exclusive checks has been added, and the existing If there's enough interest for the maths notation, we could add that too. |
cc @jaa127 @Entea
Whenever date ranges are involved, there is potential for confusion between inclusive and exclusive date conditions. If the range is defined from "1st September 2016", does it include the specified date or not?
We have had long discussions about this in the past. See PR #78. We were not sure which to use:
begin - end
before - after
Yesterday, we have added the date validation feature in PR #91, where we are using
from - to
.The terms
from - to
sound best to me; they seem to imply "inclusive" range, and I merged the PR without further thought.However, what seems natural to me may not seem natural to others. Do others agree that the terms imply "inclusive" range?
How about making it very explicit by using
fromIncluding
/fromExcluding
andtoIncluding
/toExcluding
? While it will be verbose, it will be unambiguous.Would like to hear from you all before making the next release that includes this and other changes.
The text was updated successfully, but these errors were encountered: