function formatAMPM(hours) {
            var ampm = hours >= 12 ? 'pm' : 'am';
            hours = hours % 12;
            hours = hours ? hours : 12;
            return hours + ampm;
        }
// Fix for AM/PM hours
Fix for AM/PM hours
Fix for AM / PM hours
function formatAMPM(hours) {
            var ampm = hours >= 12 ? 'pm' : 'am';
            hours = hours % 12;
            hours = hours ? hours : 12;
            return hours + ampm;
        }
function formatAMPM ( hours ) { var ampm = hours >= 12 ? 'pm' : 'am' ; hours = hours % 12 ; hours = hours ? hours : 12 ; return hours + ampm ; }
Fix for AM/PM hours
Fix for AM / PM hours