How to set days in algo

I have a option buying algo which I would like to make it work till first three weeks of the current month (or lets say untill 20th) and then it should shift to next month.

I am unable to find what function to use to get this. Request if someone can help.