Answers for "hours to days conversion"

-1

hours to days conversion

function SplitTime(numberOfHours){
    var Days=Math.floor(numberOfHours/24);
    var Remainder=numberOfHours % 24;
    var Hours=Math.floor(Remainder);
    var Minutes=Math.floor(60*(Remainder-Hours));
    return({"Days":Days,"Hours":Hours,"Minutes":Minutes})
}

var hours=27.3
    var timeResult=SplitTime(hours)
    console.log("27.3 hours translate to  "+timeResult.Days+"Days "+timeResult.Hours+"Hours and "+timeResult.Minutes+"Minutes.")
Posted by: Guest on August-13-2021

Code answers related to "hours to days conversion"

Browse Popular Code Answers by Language