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

Support comparing DateDifference and Duration #2073

Open
evansd opened this issue Jul 24, 2024 · 0 comments
Open

Support comparing DateDifference and Duration #2073

evansd opened this issue Jul 24, 2024 · 0 comments

Comments

@evansd
Copy link
Contributor

evansd commented Jul 24, 2024

It ought to be possible to write things like:

where((some_date - another_date) < days(28))

which should compile to the same thing as:

where((some_date - another_date).days < 28)

The relevant classes here are:

class DateDifference:
"""
Represents the difference between two date series (i.e. it is what you get when you
subtract one date series from another)
"""

class Duration:
value: int | IntEventSeries | IntPatientSeries

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

No branches or pull requests

1 participant