Bug in dueAfter: search (and/or time expressions)
davidbwagner says:
I have these tasks: A is due tomorrow (i.e., 12am), B is due tomorrow at 7am, C is due the day after tomorrow, D is due the day after tomorrow at 7am. It is now 3pm. Here are the results of various dueAfter: searches:
Expression Result
"8 hours" A, B, C, D (expected)
"9 hours" B , C, D (expected)
"15 hours" B, C, D (expected)
"16 hours" C, D (expected)
"23 hours" C, D (expected)
"24 hours" A, B, C, D Should be C, D!
"32 hours" A, B, C, D Should be C, D!
"33 hours" B, C, D Should be C, D!
etc. It appears that you are taking the number of hours modulo 24, which is making an unwarranted assumption about what the user means. If the user specifies some number of hours over 24, he's probably got a reason for doing so.
More examples:
"1 day" B, C, D Doesn't seem right
"2 days" D Ditto
If it's now 3pm and B and D are due at 7am, it seems like the first result should be C, D and the second result should be empty, unless you are special-casing "n days" searches to include tasks that are due at any time on the first day that overlaps the n-day period. But if this were so, then the first result should include A and the second result should include C. This may be behaving as intended, but if so the intended behavior violates the principle of least surprise.
Expression Result
"8 hours" A, B, C, D (expected)
"9 hours" B , C, D (expected)
"15 hours" B, C, D (expected)
"16 hours" C, D (expected)
"23 hours" C, D (expected)
"24 hours" A, B, C, D Should be C, D!
"32 hours" A, B, C, D Should be C, D!
"33 hours" B, C, D Should be C, D!
etc. It appears that you are taking the number of hours modulo 24, which is making an unwarranted assumption about what the user means. If the user specifies some number of hours over 24, he's probably got a reason for doing so.
More examples:
"1 day" B, C, D Doesn't seem right
"2 days" D Ditto
If it's now 3pm and B and D are due at 7am, it seems like the first result should be C, D and the second result should be empty, unless you are special-casing "n days" searches to include tasks that are due at any time on the first day that overlaps the n-day period. But if this were so, then the first result should include A and the second result should include C. This may be behaving as intended, but if so the intended behavior violates the principle of least surprise.
davidbwagner says:
Correction: the results of "33 hours" should be just D.
andrewski (Remember The Milk) says:
Thanks for this; I've added it to our list to investigate.
davidbwagner says:
BTW, this works as it should in the android app.
But of course in doing so I ran into another issue, see http://www.rememberthemilk.com/forums/android/8918/
But of course in doing so I ran into another issue, see http://www.rememberthemilk.com/forums/android/8918/