1.0.7 • Published 5 years ago

@zip-software/duration-string v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
5 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

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago