today = new Date()
year = today.getYear()
minutes = today.getMinutes()

if(today.getYear() < 2000) {
    year += 1900}

if(today.getMinutes() < 10) {
    minutes = "0" + minutes}

if((today.getHours() < 11) && (today.getHours() >= 4))
  {  document.write("<FONT color=#ffffff>おはようございます。</FONT><BR>")}

if((today.getHours() >= 11) && (today.getHours() < 18))
  {  document.write("<FONT color=#ffffff>こんにちは。</FONT><BR>")}

if((today.getHours() >= 18) && (today.getHours() <= 23)||((today.getHours() >= 0) && (today.getHours() <= 3)))
  {  document.write("<FONT color=#ffffff>こんばんは。</FONT><BR>")}

document.write("<FONT SIZE=4 color=#ffffff>本日は",year,"年",today.getMonth()+1,"月",today.getDate(),"日")

document.write(" 只今の時刻は",today.getHours(),"時",minutes,"分です。","<br></font>")
