Time based greatings
This is a easy tutorial, basically as easy as the hello world tutorial! Not sure if anybody knows how to do this, so here you guys go:
Code
<script type='text/javascript'>
var date=new Date(); // Gets the full date!
var day=date.getHours(); // Gets the hours!
if(day<=11) {
document.write('Good Morning'); // If it's before 12 PM then display this!
} else if(day<18){
document.write('Good Afternoon'); // After 12 PM display this!
} else {
document.write('Good Evening'); // After 6 PM display this!
}
</script>
Basically the code does what the comments. Say, it checks if the hour is before 12 PM on the users computer, and if it is then it will display Good Morning, and so on.
Hope this helped!