Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

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

Install

npm i convert-seconds

DownloadsWeekly Downloads

891

Version

1.0.1

License

MIT

Last publish

Collaborators

  • avatar