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

myModify = document.lastModified;
myD = new Date(myModify);
myYear = myD.getYear();
myYear4 = (myYear < 2000) ? myYear+1900 : myYear;
myMonth = myD.getMonth() + 1;
myDate = myD.getDate();
myDay = myD.getDay();

monthdays = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

if(((myYear%4==0)&&(myYear%100==0))||(myYear%400==0)){
	monthdays[1]=29;
}

switch(myDay){
	case 0:
		myDate = myDate-6;
	break;
	case 1:
		myDate = myDate;
	break;
	case 2:
		myDate = myDate-1;
	break;
	case 3:
		myDate = myDate-2;
	break;
	case 4:
		myDate = myDate-3;
	break;
	case 5:
		myDate = myDate-4;
	break;
	case 6:
		myDate = myDate-5;
	break;
}

if(myDay>0){
	myStr =  "更新日:" + myYear4+ "年"+myMonth + "月" + myDate + "日";
	document.write( myStr );
}else{
	myMonth = myMonth-1;
	x = monthdays[myMonth];
	myDate = myDate + x;
	myStr = "更新日:" + myYear4+ "年"+ myMonth + "月" + myDate + "日";
	document.write( myStr );
}

--------

myModify = document.lastModified;
myD = new Date(myModify);
myYear = myD.getYear();
myYear4 = (myYear < 2000) ? myYear+1900 : myYear;
myMonth = myD.getMonth() + 1;
myDate = myD.getDate();
myDay = myD.getDay();

monthdays = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

if(((myYear%4==0)&&(myYear%100==0))||(myYear%400==0)){
	monthdays[1]=29;
}

switch(myDay){
	case 0:
		myDate = myDate-6;
	break;
	case 1:
		myDate = myDate;
	break;
	case 2:
		myDate = myDate-1;
	break;
	case 3:
		myDate = myDate-2;
	break;
	case 4:
		myDate = myDate-3;
	break;
	case 5:
		myDate = myDate-4;
	break;
	case 6:
		myDate = myDate-5;
	break;
}

if(myDay>0){
	myStr =  "更新日:" + myYear4+ "年"+myMonth + "月" + myDate + "日";
	document.write( myStr );
}else{
	myMonth = myMonth-1;
	x = monthdays[myMonth];
	myDate = myDate + x;
	myStr = "更新日:" + myYear4+ "年"+ myMonth + "月" + myDate + "日";
	document.write( myStr );
}