fixed return value of checkDateFormat()