https://github.com/izzypt/timestamp-microservice
Public repo to complete "Timestamp Microservice" exercise on freeCodeCamp
https://github.com/izzypt/timestamp-microservice
Last synced: 15 days ago
JSON representation
Public repo to complete "Timestamp Microservice" exercise on freeCodeCamp
- Host: GitHub
- URL: https://github.com/izzypt/timestamp-microservice
- Owner: izzypt
- Created: 2023-03-17T15:22:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T16:11:35.000Z (over 3 years ago)
- Last Synced: 2025-10-28T17:40:46.455Z (8 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Timestamp-Microservice
Public repo to complete "Timestamp Microservice" exercise on freeCodeCamp
# Tests
- Passed: You should provide your own project, not the example URL.
- Passed: A request to /api/:date? with a valid date should return a JSON object with a unix key that is a Unix timestamp of the input date in milliseconds (as type Number)
- Passed: A request to /api/:date? with a valid date should return a JSON object with a utc key that is a string of the input date in the format: Thu, 01 Jan 1970 00:00:00 GMT
- Passed: A request to /api/1451001600000 should return { unix: 1451001600000, utc: "Fri, 25 Dec 2015 00:00:00 GMT" }
- Passed: Your project can handle dates that can be successfully parsed by new Date(date_string)
- Passed: If the input date string is invalid, the API returns an object having the structure { error : "Invalid Date" }
- Passed: An empty date parameter should return the current time in a JSON object with a unix key
- Passed: An empty date parameter should return the current time in a JSON object with a utc key
# Public display
https://timestamp-microservice.simobonvalot.repl.co/