Fix and tests for issue #10154 inconsistent behavior with invalid dates
closes #10154 

This addresses the original issue and another discovered with the test cases. 
Please review the tests to be sure you agree with the assertions.
