catching invalid date formats for $datefmt, $timefmt, and $datetimefmt