I have a script that deletes all files in a directory older than a specified number of days, but I want to keep files created on the 15th day of the month as an archive. I also need the day of the month to shift to the following Monday in months where the 15th falls on a weekend (keeping files creates on the 16th or 17th instead). I came up with a dirty way to do it, but hoping to get some input on a cleaner approach.

Here's my working code:

```
import datetime
import time
import os 

for root, _, filenames in os.walk(directory_to_clean):
    for filename in filenames:
        file_path = f"{root}/{filename}"
        created = os.path.getctime(file_path)
        created_day = datetime.fromtimestamp(created).strftime("%d")
        if created < time.time()-2592000:   ### deleting older than 30 days
            day_of_week = datetime.fromtimestamp(created).weekday()

            #getting rid of anything with a creation day before the 15th or after the 17th, or if 16th/17th and not a Monday, or if 15th but on a weekend 
            if 15 <= int(created_day) <= 17 or (created_day == '16' and not weekday == 0) or (created_day == '17' and not weekday == 0) or (created_day == '15' and weekday > 4):
                os.remove(file_path)

```