diff --git a/README.md b/README.md index 89624d5..1d6d775 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ It's a lib which let you to transfer human time to computer-readable time and al - Arabic number in different unixs *(h/min/s/ms)* -> time in Arabic number as seconds - *To be developed...* -### Time stamp translate +## Future of this project -- *To be developed...* +For the future of node-shi, go to the [todo-list](https://github.com/RoderickQiu/node-shi/projects/1). ## Packages Using diff --git a/package.json b/package.json index bbb966f..b8b8997 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-shi", - "version": "0.2.0", + "version": "0.2.2", "main": "index.js", "scripts": { "test": "node test.js" @@ -10,7 +10,7 @@ "english2number": "^1.0.8", "js-pinyin": "^0.1.9" }, - "description": "It's a lib which let you to transfer human time to computer-readable time and also to transfer computer-generated time to human time, available for English and Chinese.", + "description": "It's a lib which let you to transfer human time to computer-readable time and also to transfer computer-generated time to human time, available for English and Chinese words.", "author": { "name": "Roderick Qiu", "email": "scrisqiu@hotmail.com", diff --git a/src/shi.js b/src/shi.js index aed7e79..ac658a6 100644 --- a/src/shi.js +++ b/src/shi.js @@ -66,9 +66,9 @@ function unitConverter(str, treatNumberAs) { } /** - * human time parsed to Arabic number in seconds. + * human time (中文/English) parsed to Arabic number in seconds. * @param {*} str The string or the time in different unixes. - * @param {String} treatNumberAs (optional) h, min, s, ms + * @param {String} treatNumberAs (optional, only used when the input is an integer) available values: h, min, s, ms * @returns {Number} The converted number */ function humanTimeParser(str, treatNumberAs) { diff --git a/test.js b/test.js index ecc8d9b..34f20e6 100644 --- a/test.js +++ b/test.js @@ -1,6 +1,6 @@ var shi = require('./index.js'); -// human time -> time in Arabic number +// human time -> time in Arabic number as seconds console.log(shi.humanTimeParser("five hundreds and twenty one seconds"));//521 console.log(shi.humanTimeParser("a day and 一 hour, 52 min 16sec"));//93136 console.log(shi.humanTimeParser("三十三分钟"));//1980