Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/walmik/str2time
Simple JavaScript/Node.js utility to convert human input time like 9am to time format 09:00:00
https://github.com/walmik/str2time
Last synced: 29 days ago
JSON representation
Simple JavaScript/Node.js utility to convert human input time like 9am to time format 09:00:00
- Host: GitHub
- URL: https://github.com/walmik/str2time
- Owner: walmik
- Created: 2014-09-08T20:38:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T17:28:06.000Z (5 months ago)
- Last Synced: 2024-08-10T15:11:06.412Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
str2time
========Simple JavaScript utility to convert humanized time like 9am to time format 09:00:00
#### Install
`npm install str2time`
###Usage
```
var str2time = require('str2time');console.log(str2time('9am')); //outputs 09:00:00
console.log(str2time('11:30p')); //outputs 23:30:00
console.log(str2time('11:30:00')); //outputs 11:30:00
```