shany0786 8 Junior Poster in Training
.....
for (i = start_from; i < finish_by; i++) { 
                                var todayObj = new Date();
                                var current_hour = todayObj.getHours();
                                console.log(current_hour);
                                var dateObj = new Date(date);
                                if((dateObj.toDateString() == todayObj.toDateString()) && i<=current_hour){
                                   /*no print*/ 
                                }else{
                                    var time_in_12 = contvert_in_12_hours_time(i,(i+1))
                                    content += '<div class="col-md-10 col-md-offset-1 avail_time">\n\
                                                    <input title="Book time slote" type="button" class="set_appoint_time unselected_time" value="'+time_in_12+'">\n\
                                                    <span class="start_from">'+i+'</span>\n\
                                                    <span class="finish_by">'+(i+1)+'</span>\n\
                                                </div>';
                                }

                            }
                            ....

            function contvert_in_12_hours_time(start_from,finish_by){
         if(finish_by>=12){/*for showing AM ,PM*/
            if(finish_by==12){
                var content = start_from+' AM to '+finish_by+' PM';
            }else if(start_from<=12 && finish_by>12){/*for converting timing 12 hours*/
                if(start_from<12){
                    var content = start_from+' AM to '+(finish_by-12)+' PM';
                }else if(start_from==12){
                    var content = start_from+' PM to '+(finish_by-12)+' PM';
                }
            }else if(start_from>12){
                var content =(start_from-12)+' PM to '+(finish_by-12)+' PM';
            } 
        }else{/*finish_by<12*/
            var content = start_from+' AM to '+finish_by+' AM';
        }

        return  content;
    }

hello all above is my code i am facing problem in showing time slots of 90 min like i have to show 1 to 2:30 AM [90 min slot]
how can i achieve this.plz help?