Fixed bug #65199 (Wrong Day of Week) and fixed bug #63391 (Incorrect/inconsistent day of week prior to the year 1600)