Usage:
const cooldownDuration = require('cooldown-duration');
const duration = 1234567890;
const timeFormat = 'long';
const displayFormat = 'full';
console.log(cooldownDuration(duration, timeFormat, displayFormat));
Output:
2 weeks, 6 hours, 56 minutes, 8 seconds
Options:
- Duration <Integer> : the cooldown duration in milliseconds
- TimeFormat <String> : 'long' / 'short' (years, weeks, etc. / y, w, etc.)
- DisplayFormat <String> : 'full' / 'partial' (2 hours, 24 minutes, 9 seconds / 2 hours)