这个repository是用来完成freecodecamp的一个叫做“Timestamp Microservice”的api project,更多细节请访问:
https://www.freecodecamp.cn/challenges/timestamp-microservice
-
把一个字符串作为参数,判断该字符串是不是一个 Unix 时间,或者一个公历日期(例如:January 1, 2016);
-
如果是,那么它同时返回 Unix 时间戳和公历日期;
-
如果不是,那么它返回 null。
https://fcc-liy-timestamp-ms.herokuapp.com/December%2015,%202015
或
https://fcc-liy-timestamp-ms.herokuapp.com/1450137600
{ "unix": 1450137600, "natural": "December 15, 2015" }
或
{ "unix": null, "natural": null }