DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Get Number Of Minutes From Hours (Simple Version)
// Get the number of minutes from a date object's timestamp
function FormatMinutesFromHours(dateObject) {
// Get the decimal value of hours
var decimalTime = dateObject.getHours() + (dateObject.getMinutes() / 60);
// Multiply by 60 and round to get the correct number of minutes
return Math.round(decimalTime * 60);
}





