ctype_digit can't be used as value might be negative for dates before 1970