set beginning_of_week's day of the week with an option (rather than having to set globals)