added test for startOfDay, fixing first day of the week detection