Divide and Conquer: A Theory of Intraday and Day-of-the-Week Mean Effects