convert-seconds

1.0.1 • Public • Published

convert-seconds

Convert seconds to hours, minutes, seconds

Build Status

Install

$ npm install --save convert-seconds

Usage

Pass in seconds (as a number or string), and get an object in return:

var convert = require('convert-seconds');
 
convert(3661);
// => { hours: 1, minutes: 1, seconds: 1 }
 
convert(3661).hours;
// => 1
 
convert('3661').minutes;
// => 1
 
convert(3661).seconds;
// => 1

License

MIT @ Michael Wuergler

Package Sidebar

Install

npm i convert-seconds

Weekly Downloads

609

Version

1.0.1

License

MIT

Last publish

Collaborators

  • radiovisual