You know you have a new week when dow() returns a lower value than prior (MONDAY=1, FRIDAY=5). You'll also need a static value to remember the prior bar's day of the week.
https://zorro-project.com/manual/en/month.htm