Expanded sanitizeDate() smarts.