Improve search queries based on datetime#226
Conversation
ee12200 to
21d2a9b
Compare
21d2a9b to
836f952
Compare
adamruzicka
left a comment
There was a problem hiding this comment.
Could we get a test or two for this?
2e10a51 to
25baa82
Compare
|
Tests added. Let me know whether you think this amount is sufficient or I should add some more. |
92ab406 to
1acabe6
Compare
|
The test failures do not seem related to this PR unless I am mistaken. Can I do anything about them? |
This is fine. For a while I was entertaining the idea of having some which would also include custom time zones, but that isn't really necessary.
Most of them (except for jruby) should be dealt with in #227 , don't worry about them. |
Could you please rebase? |
The current implementation causes issues such as: 1. When searching for timestamps greater than the given value and minutes and seconds are omitted the value, it returns only timestamps greater than value + 1 hour. 2. When searching for timestamps greater than the given value and only month is provided as the smallest time unit, it excludes only timestamps from the first day of the month in the results but includes rest of month. Based on the logic implemented here this should not happen but instead the whole month should be excluded from the search results, i.e. '> January 2024' should exclude all January timestamps. Same problems occur when searching with `<=`. This PR aims to fix these issues.
1acabe6 to
b5bf077
Compare
|
rebased. |
adamruzicka
left a comment
There was a problem hiding this comment.
Seems to do the trick
|
Thank you @adamlazik1 ! |
The current implementation causes issues such as:
When searching for timestamps greater than the given value and
minutes and seconds are omitted the value, it returns only timestamps
greater than value + 1 hour.
When searching for timestamps greater than the given value and only
month is provided as the smallest time unit, it excludes only timestamps
from the first day of the month in the results but includes rest of
month. Based on the logic implemented here this should not happen but
instead the whole month should be excluded from the search results, i.e.
'> January 2024' should exclude all January timestamps.
Same problems occur when searching with
<=.This PR aims to fix these issues.