https://github.com/chinanf-boy/reverse-what-time
reverse human readable time to number
https://github.com/chinanf-boy/reverse-what-time
human number readable
Last synced: 11 months ago
JSON representation
reverse human readable time to number
- Host: GitHub
- URL: https://github.com/chinanf-boy/reverse-what-time
- Owner: chinanf-boy
- License: mit
- Created: 2018-06-05T00:51:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-05T09:35:26.000Z (about 8 years ago)
- Last Synced: 2025-03-09T22:02:27.267Z (over 1 year ago)
- Topics: human, number, readable
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# reverse-what-time [](https://travis-ci.org/chinanf-boy/reverse-what-time) [](https://codecov.io/gh/chinanf-boy/reverse-what-time?branch=master)
> reverse human readable time to number
## Install
```
npm install reverse-what-time
```
```
yarn add reverse-what-time
```
## Usage
```js
const reverseWhatTime = require('reverse-what-time');
reverseWhatTime('1Y2M1W1d3h6m44s');
// : 1 year 2 mouths 1 week 1 day 3 hours 6 minutes 44 seconds
// 37422404
reverseWhatTime('1Y,2M,1W,1d,3h,6m,44s',',');
```
## API
### reverseWhatTime(time, split)
#### time
name: | time
---------|----------
Type: | `string`
Desc: | time : human readable
##### split
name: | split
---------|----------
Type: | `string`
Default: | ``
Desc: | split time
## contact
- [what-time](https://github.com/chinanf-boy/what-time) human readable time
## use by
- [keep-mac-light](https://github.com/chinanf-boy/keep-mac-light) keep macos light no down
## License
MIT © [chinanf-boy](http://llever.com)