javascript現在の時間

626 ワード

var date = new Date();
var d = "";
var t = date.getFullYear() + " " + (date.getMonth() + 1) + " " + date.getDate() + " " + date.getHours() + " " + date.getMinutes() + " ";//date.getSeconds() + " "
var nowtime = date.getHours() + " " + date.getMinutes() + " ";

if (date.getHours() < 8) {
	d = "  ";
} else if (date.getHours() < 12) {
	d = "  ";
} else if (date.getHours() < 18) {
	d = "  ";
} else {
	d = "  ";
}