added ms docs
This commit is contained in:
parent
2a4a37660a
commit
a8c128179a
30
README.md
30
README.md
@ -53,13 +53,14 @@ console.log(time); // will log 98718
|
|||||||
|
|
||||||
Timestring will parse the following keywords into time values:
|
Timestring will parse the following keywords into time values:
|
||||||
|
|
||||||
1. `s, sec, secs, second, seconds` - will parse to seconds
|
1. `ms, milli, millisecond, milliseconds` - will parse to milliseconds
|
||||||
2. `m, min, mins, minute, minutes` - will parse to minutes
|
2. `s, sec, secs, second, seconds` - will parse to seconds
|
||||||
3. `h, hr, hrs, hour, hours` - will parse to hours
|
3. `m, min, mins, minute, minutes` - will parse to minutes
|
||||||
4. `d, day, days` - will parse to days
|
4. `h, hr, hrs, hour, hours` - will parse to hours
|
||||||
5. `w, week, weeks` - will parse to weeks
|
5. `d, day, days` - will parse to days
|
||||||
6. `mth, mths, month, months` - will parse to months
|
6. `w, week, weeks` - will parse to weeks
|
||||||
7. `y, yr, yrs, year, years` - will parse to years
|
7. `mth, mths, month, months` - will parse to months
|
||||||
|
8. `y, yr, yrs, year, years` - will parse to years
|
||||||
|
|
||||||
Keywords can be used interchangeably:
|
Keywords can be used interchangeably:
|
||||||
|
|
||||||
@ -74,13 +75,14 @@ console.log(time); // will log 141615
|
|||||||
|
|
||||||
By default the return time value will be in seconds. This can be changed by passing one of the following strings as an argument to `timestring`:
|
By default the return time value will be in seconds. This can be changed by passing one of the following strings as an argument to `timestring`:
|
||||||
|
|
||||||
1. `s` - Seconds
|
1. `ms` - Milliseconds
|
||||||
2. `m` - Minutes
|
2. `s` - Seconds
|
||||||
3. `h` - Hours
|
3. `m` - Minutes
|
||||||
4. `d` - Days
|
4. `h` - Hours
|
||||||
5. `w` - Weeks
|
5. `d` - Days
|
||||||
6. `mth` - Months
|
6. `w` - Weeks
|
||||||
7. `y` - Years
|
7. `mth` - Months
|
||||||
|
8. `y` - Years
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var str = '22h 16m';
|
var str = '22h 16m';
|
||||||
|
Loading…
Reference in New Issue
Block a user