1.1.0 • Published 2 years ago

convert-seconds-to-human v1.1.0

Weekly downloads
4
License
ISC
Repository
github
Last release
2 years ago

Help

Convert seconds into Y/D/H/M/S, in calendar and astronomical format.

To install the package :

npm i convert-seconds-to-human

Remember to require the package :

const convert = require('convert-seconds-to-human')

Examples

First example with cal format

const resultCal = convert(123456789, 'cal')

console.log(resultCal)
/* result :  {
    years: 3,
    days: 333,
    hours: 21,
    minutes: 33,
    seconds: 9
}*/

Second example with astr format

const resultAstr = convert(123456789, 'astr')

console.log(resultAstr)

/* result :  {
    years: 3,
    days: 333,
    hours: 3,
    minutes: 33,
    seconds: 9
}*/
1.1.0

2 years ago

1.0.0

3 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago