1.0.7 • Published 6 years ago

@zip-software/duration-string v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

duration-string

This package takes a value defined in seconds and converts it to a readable string.

import durationString from 'duration-string'

durationString(3600)
// output: 01:00:00

durationString(300)
// output: 00:05:00

durationString(243, {
    forceShowDays: false,
    forceShowHours: false,
    forceShowMinutes: false,
})
// output: 243

durationString(100000, {
    forceShowDays: true,
})
// output: 01:03:46:40

Installation

npm install @zip-software/duration-string --save
1.0.7

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago