Closed Inventitech closed 7 years ago
Well, I guess we could pre-check a bunch of different inputs..... but empty input is indeed a good candidate. Would you like to submit a PR?
Closed by #16
If you have ideas for which values to exclude other than the empty string -- please tell me. I was thinking of doing a trim on the values before and removing any non-alpha numeric chars.
TRimming is OK, but removing non-alphanumeric is not OK, because -
and :
might have meaning.
But the real solutions would be to rewrite the parser in C, actually.
The reason is that even if the input is "", parse_date does an exhaustive search of all its sub-functions to finally come up with the answer
NA
. This could be made much faster by doing the check up-front.