<script src="//cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><script>
var now = new Date();
var hrs = now.getHours();
var msg = "";

if (hrs >=  0){
  alert("Mornin' Sunshine!");
} elseif (hrs >  15){
  alert("Good morning");
} elseif (hrs > 12){
  alert("Good afternoon");
} elseif (hrs > 17){
  alert("Good evening");
} elseif (hrs > 22){
  alert("Go to bed!");
}
</script>