minutes-to-hours-days
v0.1.18
Published
• getMinuteFromDaysHours(): Accept date string in format 1d 1h 1m to convert to minutes
Downloads
12
Readme
Minute to days and hours and vice versa
• getMinuteFromDaysHours(): Accept date string in format 1d 1h 1m to convert to minutes
• getDaysHoursFromMinute(): Convert any number to 1d 1h 1m format, 1d being 8h
Examples
console.log(getMinuteFromDaysHours("1d 1h 1m"))
// returns 541
console.log(getDaysHoursFromMinute(602))
// returns 1d 2h 2m