fixing detection of weekdays