https://github.com/tomoat/fcc-timestamp-ms
Timestamp Microservice
https://github.com/tomoat/fcc-timestamp-ms
Last synced: 3 months ago
JSON representation
Timestamp Microservice
- Host: GitHub
- URL: https://github.com/tomoat/fcc-timestamp-ms
- Owner: tomoat
- Created: 2017-05-10T14:41:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-05-11T17:36:43.000Z (about 4 years ago)
- Last Synced: 2025-11-30T18:17:06.920Z (6 months ago)
- Language: HTML
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Timestamp Microservice
- 把一个字符串作为参数,判断该字符串是不是一个 Unix 时间,或者一个公历日期(例如:January 1, 2016)。
- 如果是,那么它同时返回 Unix 时间戳和公历日期。
- 如果不是,那么它返回 null 。
### Example usage:
https://fccp-timestamp.herokuapp.com/December%2015,%202015
https://fccp-timestamp.herokuapp.com/1450137600
### Example output:
{ "unix": 1450137600, "natural": "December 15, 2015" }
{ "unix": null, "natural": null }