date = new Date();
 var day_of_week_number = date.getDay();
 var day_of_month = date.getDate();
 var month_number = date.getMonth();
 var year = date.getYear();
 var day_of_week = '';
 var month = ''
 if(month_number == 0)  month = 'January';
 if(month_number == 1)  month = 'February';
 if(month_number == 2)  month = 'March';
 if(month_number == 3)  month = 'April';
 if(month_number == 4)  month = 'May';
  if(month_number == 5)  month = 'June';
 if(month_number == 6)  month = 'July';
 if(month_number == 7)  month = 'August';
 if(month_number == 8)  month = 'September';
 if(month_number == 9)  month = 'October';
 if(month_number == 10)  month = 'November';
 if(month_number == 11)  month ='December';
if(day_of_week_number == 0)  day_of_week = 'Sunday';
 if(day_of_week_number == 1)  day_of_week = 'Monday';
 if(day_of_week_number == 2)  day_of_week = 'Tuesday';
 if(day_of_week_number == 3)  day_of_week = 'Wednesday';
 if(day_of_week_number == 4)  day_of_week = 'Thursday';
 if(day_of_week_number == 5)  day_of_week = 'Friday';
 if(day_of_week_number == 6)  day_of_week = 'Saturday';
 var date_to_show = month + ' ' + day_of_month + ',  ' + day_of_week   +  '. '; 
document.writeln(date_to_show);

var h=(new Date()).getHours(); 
if (h > 4 && h < 9) document.writeln("Good morning!"); 
if (h > 8 && h <  18) document.writeln("Good day!"); 
if (h > 17 && h <  23) document.writeln("Good evening!"); 
if (h > 22 || h <  5) document.writeln("Good night!"); 