getdate


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

function getdate(){
	//2008-02-15金17:22:03.767
	var myTbl     = new Array("日","月","火","水","木","金","土");
	var myD       = new Date();
	var myYear    = myD.getYear();
	var myYear4   = (myYear < 2000) ? myYear+1900 : myYear;
	var myMonth   = ("000"+(myD.getMonth() + 1)).slice(-2);
	var myDate    = ("000"+(myD.getDate())).slice(-2);
	var myDay     = ("000"+(myD.getDay())).slice(-2);
	var myHours   = ("000"+(myD.getHours())).slice(-2);
	var myMinutes = ("000"+(myD.getMinutes())).slice(-2);
	var mySeconds = ("000"+(myD.getSeconds())).slice(-3);
	var mymSeconds =("000"+(myD.getMilliseconds();
	return = myYear4 + "-" + myMonth + "-" + myDate + myTbl[myDay] + myHours + ":" + myMinutes + ":" + mySeconds + "."+mymSeconds;
}