sec
Convert a time string to seconds: '00:22:17' → 1337
Last updated 10 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install sec 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (10 years ago)

1 Versions

  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org