Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

codeallyio/timestamp-microservice-fcc-solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User stories (WIP) :

  1. The API endpoint isGET [project_url]/api/timestamp/:date_string?
  2. A date string is valid if can be successfully parsed bynew Date(date_string) (JS) . Note that the Unix timestamp needs to be aninteger (not a string) specifyingmilliseconds. In our test we will use date strings compliant with ISO-8601 (e.g."2016-11-20") because this will ensure an UTC timestamp.
  3. If the date string isempty it should be equivalent to triggernew Date(), i.e. the service uses the current timestamp.
  4. If the date string isvalid the api returns a JSON having the structure{"unix": <date.getTime()>, "utc" : <date.toUTCString()> }e.g.{"unix": 1479663089000 ,"utc": "Sun, 20 Nov 2016 17:31:29 GMT"}.
  5. If the date string isinvalid the api returns a JSON having the structure{"error" : "Invalid Date" }.

Example usage:

Example output:

  • {"unix":1451001600000, "utc":"Fri, 25 Dec 2015 00:00:00 GMT"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp