Body007
1
Tell us what’s happening:
Describe your issue in detail here.
it keeps giving me the test failed
Your project can handle dates that can be successfully parsed by
new Date(date_string)
and I don’t know why
Your project link(s)
solution: https://replit.com/@abd-el-rahmane7/boilerplate-project-timestamp-1
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Challenge: Timestamp Microservice
Link to the challenge:
Your date strings do not cover all the possibilities. Log the route inputs and outputs and you’ll find
req.body: undefined
req.params: {"date_string":"05 October 2011, GMT"}
req.query: {}
{ error: 'Invalid Date' }
which is a valid date.
Check the MDN documentation for the Date()
object and how it parses for further information.
1 Like
but when I make a request like this
[project URL]/api/25 October 2013
it works just fine and gives me the date
system
Closed
4
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.