Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.12 KB

README.md

File metadata and controls

28 lines (22 loc) · 1.12 KB

Timestamp-API

Requirements

  • 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
  • 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
  • A request to /api/1451001600000 should return { unix: 1451001600000, utc: "Fri, 25 Dec 2015 00:00:00 GMT" }
  • An empty date parameter should return the current time in a JSON object with a unix key
  • An empty date parameter should return the current time in a JSON object with a utc key

API Response

Get Current Date

image

Get Date from Unix Timestamp

image

Get Unix Timestamp from Date

image