Everything works as expected but failing:
Your project can handle dates that can be successfully parsed by
Here is a link to replit project:
I’ve looked all over and seems a lot of people having issues with this. As far as I can work out surely if I change user input (in either of the 2 formats) to a valid JS Date and check if is parsed successfully by passing to Date.parse() it should pass the test?
It all works as expected as far as I can see, although after running tests I get all sorts of errors in console. The first one being the regex match(). I only added that as an extra check really to check if in date format “2015-12-12” sort of thing.
Can anyone give me any hints as to where I am going wrong please?
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/22.214.171.124 Safari/537.36
Challenge: Back End Development and APIs Projects - Timestamp Microservice
Link to the challenge: