for eg., according to the logic it takes 31 st march as date if the popup appears as “no reference found” then it should pick 30th march. again if the popup appears it should pick 29th. it shoud not consider sat and sun. If it is sat or sun then it should take before date