Open mvaragnat opened 8 years ago
Currently if the input is garbage or incorrect, the parser returns the current Date. I think it'd be better to return an error message like "Invalid input" so that it's easy to catch.
Or how about return null
null
No error state feels like a pretty big issue to me.
Currently if the input is garbage or incorrect, the parser returns the current Date. I think it'd be better to return an error message like "Invalid input" so that it's easy to catch.