Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ray-1337/extended-parse-duration
Convert extended time formats to milliseconds.
https://github.com/ray-1337/extended-parse-duration
ms parse parse-ms parser time time-parse time-parsing
Last synced: 8 days ago
JSON representation
Convert extended time formats to milliseconds.
- Host: GitHub
- URL: https://github.com/ray-1337/extended-parse-duration
- Owner: ray-1337
- License: mit
- Created: 2023-05-31T15:11:13.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-06-02T09:18:25.000Z (over 1 year ago)
- Last Synced: 2024-05-02T03:05:41.589Z (8 months ago)
- Topics: ms, parse, parse-ms, parser, time, time-parse, time-parsing
- Language: TypeScript
- Homepage: https://www.npmjs.com/extended-parse-duration
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EPD
Convert time formats to milliseconds (Extended version)# Examples
```js
import parser from "extended-parse-duration";parser("30s"); // 30000
parser("45 seconds"); // 45000
parser("00:25"); // 25000
parser(55); // 55000
```# Supports
- Time with colon notation (dd:hh:mm:ss, hh:mm:ss, mm:ss, m:ss)
- [ms](https://npmjs.com/ms) format.
- [Human readable](https://npmjs.com/parse-duration) format.# License
[MIT](LICENSE)