convert-seconds

Convert seconds to hours, minutes, seconds


Keywords
convert, seconds, minutes, hours, translate, calculate, time, duration
License
MIT
Install
npm install convert-seconds@1.0.1

Documentation

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