parse-seconds
parse-seconds converts seconds into years, weeks, days, hours, and/or minutes.
This is mostly useful for formatting media durations; the larger units of time are included for completeness (maybe you have a really long video or something).
install
$ npm install parse-seconds
usage
var parse = // Basic usage> years: 0 weeks: 0 days: 0 hours: 0 minutes: 1 seconds: 0 // Avoid specific units of time60 * 60 + 61> years: 0 weeks: 0 days: 0 hours: 0 minutes: 61 seconds: 1