Implement date wise refinement

I am trying to implement refinements as shown in the image

  1. Availability refinement

On availability refinement, I have a available quantity field and a minimum order quantity field. I want to toggle between the stock availability depends on if quantity less than minimum order quantity. How to achieve this?

  1. Arrival refinement, All products have a arrival date. based on that, If user clicked last 7 days, I want to filter the products that have created date less than equal a week,