duration-to-sentence
Lightweight function that returns human readable string for given duration in seconds.
Shows days, hours, minutes and seconds passed
Usage example
Disclaimer: At the moment function might not be exposed directly, try to log out the imported module first...
const duration = 435432const longHumanString = const shortHumanString = console// output: '5days, 57minutes, 12seconds' console// output: '5d, 57m, 12s' // Notice that time units are skipped when they equal 0.// In this example that was the "hours" value