How to identify remaining days to expire for a traded instrument in a set

Hi,

I am looking for a reference to include the logic for identify the days to expire for traded instrument is <= 1, I would like to exit the positions tied to the set.

Regards,
Varalakshmi E A

use DayDifference Keyword