Fix off-by-one bug in DayOfWeek functions