﻿
	//例外日付配列
	exeDa = 7;
	exceptionDate = new Array(exeDa);
	for (i = 0; i < exceptionDate.length; i++) {
		exceptionDate[i] = new Array(2);
	}

	//12/29 ⇒ 1/5
	exceptionDate[0][0] = "2011/12/29";
	exceptionDate[0][1] = "2012/1/5";
	//12/30 ⇒ 1/5
	exceptionDate[1][0] = "2011/12/30";
	exceptionDate[1][1] = "2012/1/5";
	//12/31 ⇒ 1/5
	exceptionDate[2][0] = "2011/12/31";
	exceptionDate[2][1] = "2012/1/5";
	//1/1 ⇒ 1/5
	exceptionDate[3][0] = "2012/1/1";
	exceptionDate[3][1] = "2012/1/5";
	//1/2 ⇒ 1/5
	exceptionDate[4][0] = "2012/1/2";
	exceptionDate[4][1] = "2012/1/5";
	//1/3 ⇒ 1/5
	exceptionDate[5][0] = "2012/1/3";
	exceptionDate[5][1] = "2012/1/5";
	//1/4 ⇒ 1/5
	exceptionDate[6][0] = "2012/1/4";
	exceptionDate[6][1] = "2012/1/5";

	da = 28;
	daSec = da * 24 * 60 * 60 * 1000;
	dd = new Date();
	nDate = new Date(dd.getFullYear(), dd.getMonth(), dd.getDate(), 0, 0, 0);
	nDate.setTime(nDate.getTime() + daSec);

	for (i = 0; i < exceptionDate.length; i++) {
		compDate = new Date(exceptionDate[i][0]);
		if (nDate.toString() == compDate.toString()) {
			nDate = new Date(exceptionDate[i][1]);
			break;
		}
	}

	yy = nDate.getFullYear();
	mm = nDate.getMonth() + 1;
	dd = nDate.getDate();
	
	viewDate = mm + "/" + dd;

	document.write (viewDate);

