<script>
var totalCost = 15.23212
//console.log(totalCost.toFixed(2));

//client wants June 26th, 2018 07:21 pm.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
//this is because the date object only offers us months numerically unless you're ok with a 3 letter abbreviation
var rightNow  = new Date();
    rightNow.setMonth(6);
    var month = rightNow.setMonth(6);
    
    /*console.log(rightNow.getMonth())    
console.log(months[rightNow.getMonth()]);    

console.log(rightNow.toDateString());*/
var hours = rightNow.getHours();//a getter
var minutes = rightNow.getMinutes();// a getter   
    if (minutes < 10){
        minutes = '0'+minutes
    }
    //to handle the single digit issue
    var postfix = ' am.'; //for 12 hours clocks
    if (hours > 12){
        hours = hours-12;
        postfix = ' pm. ';
    }
    
var ordinalFormat 
var d= rightNow.getDate(); //gets the number date of the month
    
      switch (d % 10) {
            case 1:  ordinalFormat = "st";
            break;  
            case 2:  ordinalFormat = "nd";
            break;  
            case 3:  ordinalFormat = "rd";
            break;  
            default: ordinalFormat = "th";
        }    
         
     if(d>3 && d<21) ordinalFormat = 'th'; // thanks kennebec

     //output
document.write(months[rightNow.getMonth()] + ' ' + rightNow.getDate() + ordinalFormat + ', ' + rightNow.getFullYear() + ' ' + hours + ':' + minutes + postfix);
    

</script>