Date time validation

The goal here is to fix the (broken) SetFromDateString() function, which broke with the string merge, as Mid(0, -1) returns an empty string, whilst substr(0, -1) returns the full string.

In addition, as SetFromDateString() is supposed to attempt a 2005-06-18 style date if no day is found, we mayaswell just validate dates a little better and check for that first.

This fixes #3863 in an alternate manner.

@BigNoid: Mind testing?