master
This commit is contained in:
@@ -8,4 +8,4 @@ if your input does not does not look like dhms it is no problem as long as you u
|
|||||||
|
|
||||||
so ToSec('7h5m') retuns 25500
|
so ToSec('7h5m') retuns 25500
|
||||||
|
|
||||||
the programm is not case sensitive so 7H5m returns the same as 7h5M or 7h5m
|
the programm is not case sensitive so 7H5m or 7h5M will return the same as 7h5m
|
||||||
@@ -58,8 +58,7 @@ function ToDay(input){
|
|||||||
let data = splitDate(input);
|
let data = splitDate(input);
|
||||||
let total = data[0] * 1 + data[1] / 24 + data[2] / 1440 + data[3] / 86400;
|
let total = data[0] * 1 + data[1] / 24 + data[2] / 1440 + data[3] / 86400;
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
ToSec,
|
ToSec,
|
||||||
|
|||||||
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "time-convert",
|
"name": "timestringtonumber",
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"description": "",
|
"description": "generetes a number from a time string",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"start": "node index.js"
|
"start": "node index.js"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "kaj van schalkwijk",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user