Help me on APIs and Microservices Projects - Timestamp Microservice

I passed all the test parameters except Your project can handle dates that can be successfully parsed by new Date(date_string)

any one can help, what does it mean ?

Welcome, armaulan.

Would you mind sharing a link to your project code?


I’m, guessing (didn’t test it) it’s because you are calling parseInt on the string. So when the string is in the format “05 October 2011” you get an incorrect output

timeStampFinal = new Date(parseInt(date_string))
parseInt('05 October 2011')
// 5

new Date(parseInt('05 October 2011'))
// Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)

new Date('05 October 2011')
// Wed Oct 05 2011 00:00:00 GMT+0200 (Central European Summer Time)

I believe there have been some updates to this challenge and this might be a new requirement that was added not too long ago.

Edit: here is the link to the editor code as well


you’re right, I did it
thanks :slightly_smiling_face:

1 Like