matthewmueller / date

Date() for humans
http://matthewmueller.github.io/date/
1.48k stars 88 forks source link

Return error if date not understood #80

Open mvaragnat opened 8 years ago

mvaragnat commented 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.

sundeepgupta commented 7 years ago

Or how about return null

alexgorbatchev commented 7 years ago

No error state feels like a pretty big issue to me.