Fix startOf and setDateArr