fixing getting a date's day of week