https://github.com/beaglefoot/fcc-timestamp-microservice
https://github.com/beaglefoot/fcc-timestamp-microservice
express rest
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/beaglefoot/fcc-timestamp-microservice
- Owner: Beaglefoot
- Created: 2018-04-15T20:13:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-17T20:37:54.000Z (about 7 years ago)
- Last Synced: 2025-02-03T23:54:43.496Z (3 months ago)
- Topics: express, rest
- Language: JavaScript
- Homepage: https://fcc-timestamp-bf.glitch.me/
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Timestamp Microservice
The first project in API section on [freeCodeCamp](https://www.freecodecamp.org/challenges/timestamp-microservice).
**The user stories are:**
* I can pass a string as a parameter, and it will check to see whether that string contains either a unix timestamp or a natural language date (example: January 1, 2016).
* If it does, it returns both the Unix timestamp and the natural language form of that date.
* If it does not contain a date or Unix timestamp, it returns null for those properties.**Examples of usage:**
```
Url Response
https://fcc-timestamp-bf.glitch.me/1450137600 -> {"unix":1523962353,"natural":"April 17, 2018"}
https://fcc-timestamp-bf.glitch.me/April%2017,%202018 -> {"unix":"1523912400","natural":"April 17, 2018"}
https://fcc-timestamp-bf.glitch.me/wrong -> {"unix":null,"natural":null}
```