Tell us what’s happening:
i passed in all the test except in test 3 where it says to return a unix api. please help.
my repl it link:
urlhttps://repl.it/@meeramenon07/boilerplate-project-timestamp-1#server.js
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; SM-A107F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.111 Mobile Safari/537.36.
Tell us what’s happening:
I passed all the test for this challenge except the test that requires that a request for api/timestamp/1451001600000 should return {unix:1451001600000; utc:“Fri, 25 Dec 2015 00:00:00zGMT”}
when I test my api with utc it works but when i test with value of above unix , I cannot get this result. Please check my repl it file link:
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 10; SM-A107F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.111 Mobile Safari/537.36.
server.js on line 37, your if statement checks if input includes an empty string, which for timestamp will be true, then you try to create a date from that timestamp string, which results in NaN, which then on line 48 will result in true which will send “Invalid Date” response.
Tell us what’s happening:
My project passing all tests and I also tested correctly for. both unix and utc dates and it works however now there is one test thats not passing that says "your project can handle dates that can be successfully parsed by new Date(date_String)
Now I included strings in the code do I passed the above test vut now Iam failing another test that I passed earlier:"a request to/ api/timestamp/1451001600000 should return {unix:1451001600000, utc:“Fri, 25 Dec 2015 00:00:00 GMT”}
I am passing this test after invluding string in my code but now failing in another test that says "request to /spu/timestamp/1451001600000 should return unix and utc date s.
Tell us what’s happening:
I edited my code and passed all tests but cannot pass one test that requests:a request to /api/timestamp/1451001600000 should return {unix:1451001600000; utc:“Fri, 25 Dec 2015 00:00:00 GMT”}