Yngvarr

Generation

generate functionTue, 14 Feb 2023

time online

function time(hrs, mins) { let totalMins = hrs * 60 + mins; let totalDays = Math.floor(totalMins / (24*60)); let remainingMins = totalMins % (24*60); let remainingHrs = Math.floor(remainingMins / 60); return `${totalDays} day(s) and ${remainingHrs} hour(s)`; } time(10, 0)

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant