We would like to know how to get next 12:00:00PM for date.
<!DOCTYPE html>
<html>
<body>
<script type='text/javascript'>
var nextNoon = new Date();
if (nextNoon.getHours()>=12) {<!-- www . j av a 2s. com-->
nextNoon.setDate(nextNoon.getDate()+1)
}
nextNoon.setHours(12,0,0,0);
document.writeln(nextNoon);
</script>
</body>
</html>
The code above is rendered as follows: