today=new Date();
Y=today.getFullYear();
M=today.getMonth()+1;
D=today.getDate();
h= today.getHours();
m=today.getMinutes();
if((h>5)&&(h<=10)){
document.write("おはようございます、");
}else if((h>10)&&(h<=17)){
document.write("こんにちは、");
}else{
document.write("こんばんは、");
}
document.write("ただいま",Y,"年",M,"月",D,"日",h,"時",m,"分","です。");
