cdisc-org / cdisc-rules-engine

Open source offering of the cdisc rules engine
MIT License
46 stars 12 forks source link

target_is_sorted_by handle partial dates #830

Closed SFJohnson24 closed 2 weeks ago

SFJohnson24 commented 3 weeks ago

I have updated the function to keep the original sort check. It now also looks at the precision if it is a date. 2004-10 vs 2004-10-31 will compare the year and month as the first is missing the day digit. Because the two dates overlap, we mark the less precise as false for sort order as we cannot draw conclusions about what day it is. If there is no overlap, we compare based on the lowest precision to determine if they are sorted properly.