API: Timestamp Microservice

User stories:

  1. The API endpoint is GET http://timestamp.celandau.com/api/timestamp/:date_string?
  2. A date string is valid if can be successfully parsed bynew Date(date_string).
  3. An empty date string will generate a current time stamp via new Date().
  4. A valid date string will return JSON having the structure:
    {"unix": <date.getTime()>, "utc" : <date.toUTCString()> }
    e.g. {"unix": 1479663089000 ,"utc": "Sun, 20 Nov 2016 17:31:29 GMT"}

Example Usage:

Example Output:

{"unix":1518378684512,"utc":"Sun, 11 Feb 2018 19:51:24 GMT"}