Closed munierujp closed 4 years ago
Hi @munierujp,
As with #4, I think this is outside of the scope if this package. This can be achieved easily with a third party library, or plain JS.
I think libraries like "date-fns" have a compelling reason to supply a format
function, since each component of a date can be expressed in many different ways. I don't see the same value in providing such a function for durations as they seem much simpler to me. If we did implement this for duration, we'd have to handle edge cases, like...
format({ minutes: 400 }, 'mm:ss')
? 400:00
?format({ months: 1 }, 'mm:ss')
?I may be looking at this from the wrong perspective. If you have any other examples or can provide more context to demonstrate the value of this, let me know.
Closing due to lack of activity
Usage: