Skip to content

Conversation

@RakeshBobba03
Copy link
Collaborator

@RakeshBobba03 RakeshBobba03 commented Oct 28, 2025

Add automatic precision detection for date comparison operators (Issue #1372 )
Extends the existing date_component parameter to accept "auto" as a value, enabling automatic precision detection when comparing dates with different granularity levels. When specified, the system detects the precision of both dates and compares them at the common (less precise) level. This solves the use case of comparing date-only fields like RFSTDTC ("2025-06-25") with datetime fields like AESTDTC ("2025-06-25T17:22") at the appropriate precision level. Implementation includes support for CDISC partial dates and uncertainty markers, comprehensive test coverage, and updated documentation in README.md and Operator.md.

@RakeshBobba03 RakeshBobba03 marked this pull request as ready for review October 28, 2025 02:51
Copy link
Collaborator

@gerrycampion gerrycampion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through and made a bunch of changes because I felt it was easier than writing all the comments. Primarily the changes remove redundant code and take advantage of enums by iterating over the enums wherever possible instead of handling each enum case individually.
Please review the changes I've made to see how this type of repetition could be avoided and let me know if you disagree with any of those changes. I did not modify the test cases, so I think it should produce the same results. I do have one additional comment to be addressed.

@gerrycampion gerrycampion merged commit 5055d42 into main Nov 24, 2025
11 checks passed
@gerrycampion gerrycampion deleted the 1372-Datetime-Comparison branch November 24, 2025 17:25
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.

Proposal for datetime comparison where precision of the datetimes is different.

4 participants