Skip to content
Convert a time string to seconds: '00:22:17' → 1337
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

sec Build Status

Convert a time string to seconds: '00:22:17'1337

Install

$ npm install --save sec

Usage

var sec = require('sec');

// hours:minutes:seconds
sec('00:22:17');
//=> 1337

sec('22:17');
//=> 1337

sec('17');
//=> 17

License

MIT © Sindre Sorhus

You can’t perform that action at this time.