using same logic for day and week functions