Skip to content
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

Time interval cqp whole days #393

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Time interval cqp whole days #393

merged 1 commit into from
Sep 24, 2024

Conversation

arildm
Copy link
Member

@arildm arildm commented Sep 19, 2024

Fixes #379

@arildm
Copy link
Member Author

arildm commented Sep 19, 2024

@janiemi Could you check if this fixes #379? I couldn't resist changing a few other details in the logic, I hope you don't mind.

For instance, I didn't see the point of the second condition in

[int(_.text_datefrom) >= 20020101 & int(_.text_datefrom) <= 20031231 & int(_.text_dateto) <= 20031231]

so that is now simplified further to

[int(_.text_datefrom) >= 20020101 & int(_.text_dateto) <= 20031231]

We can assume that the datefrom of a text is always less than or equal to its dateto, right?

@janiemi
Copy link
Contributor

janiemi commented Sep 20, 2024

@arildm, you are of course right: datefrom should always be less than or equal to dateto; if not, I’d consider it an error in the data. As far as I can see, the results would seem to be what I’d expect. Thanks!

@arildm arildm merged commit 22c4e40 into dev Sep 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify time interval CQP covering whole days
2 participants