追蹤
6.5公分的小腳ㄚ
關於部落格


var today = new Date();
var year = today.getYear();
var month = today.getMonth();
var day = today.getDate();
var t_yy = 0;
var t_mm = 0;
var t_dd = 0;
var b_yy = 2007;
var b_mm = 4;
var b_dd =7;

t_yy = year - b_yy - 1;

if ( month + 1 > b_mm)
{ t_mm = month - b_mm ;
t_yy++;
}
else
t_mm = 12 - b_mm + month;

if (day > b_dd)
{ t_dd = day - b_dd;
t_mm++;
}
else
t_dd = daysInMonth(month, year) - b_dd + day;

if (t_dd > daysInMonth(month, year)-1)
{ t_dd = 0;
t_mm++;
}

if (t_mm > 11)
{ t_mm = 0;
t_yy++;
}

document.write(" 小恩哥哥已經 ");

if (t_yy > 0)
document.write(" " + t_yy + " 歲 ");

if (t_mm > 0)
document.write(t_mm + " 個月");

if (t_dd > 0)
document.write(" 又 " + t_dd + " 天") ;

//****** function set ******

function arrayOfDayInMonths(isLeapYear)
{ this[0] = 31;
this[1] = 28;
if (isLeapYear)
this[1] = 29;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}

function daysInMonth(month, year)
{ var isLeapYear = ((( year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0));
var monthdays = new arrayOfDayInMonths(isLeapYear);
return monthdays[month];
}






var today = new Date();
var year = today.getYear();
var month = today.getMonth();
var day = today.getDate();
var t_yy = 0;
var t_mm = 0;
var t_dd = 0;
var b_yy = 2008;
var b_mm = 11;
var b_dd =1;

t_yy = year - b_yy - 1;

if ( month + 1 > b_mm)
{ t_mm = month - b_mm ;
t_yy++;
}
else
t_mm = 12 - b_mm + month;

if (day > b_dd)
{ t_dd = day - b_dd;
t_mm++;
}
else
t_dd = daysInMonth(month, year) - b_dd + day;

if (t_dd > daysInMonth(month, year)-1)
{ t_dd = 0;
t_mm++;
}

if (t_mm > 11)
{ t_mm = 0;
t_yy++;
}

document.write(" 芸芸妹妹已經 ");

if (t_yy > 0)
document.write(" " + t_yy + " 歲 ");

if (t_mm > 0)
document.write(t_mm + " 個月");

if (t_dd > 0)
document.write(" 又 " + t_dd + " 天") ;

//****** function set ******

function arrayOfDayInMonths(isLeapYear)
{ this[0] = 31;
this[1] = 28;
if (isLeapYear)
this[1] = 29;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}

function daysInMonth(month, year)
{ var isLeapYear = ((( year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0));
var monthdays = new arrayOfDayInMonths(isLeapYear);
return monthdays[month];
}


  • 24988

    累積人氣

  • 0

    今日人氣

    0

    追蹤人氣

計畫趕不上變化

自從小恩出生後,周遭的親朋好友就開始關心我的下一胎, 這種情形隨著小恩長大,愈來愈多人問, 甚至連出去玩,都有阿桑在問了小恩的年紀後隨口就說,可以再生下一個了, 而我,主要的當事人,原本是打算3-4年後再考慮第二個寶寶的, 也因為詢問的程度太高,而常常思考這個問題, 其實當初會希望讓二個寶寶差3-4歲是因為看到我堂姊的例子, 他兒子和女兒差了4歲,妹妹出生時,哥哥已經很懂事了,所以還蠻照顧妹妹的, 看到這麼好的例子讓我嚮往不已,不過...後來我改變心意了, 套句長輩們常講的,既然要生就一次生完吧!要累就一次累完吧! 或許是小恩愈來愈好搞定,讓我忘了當初帶他帶得快精神崩潰的情形, 總之就是和恩爸計畫生第二個寶寶後,馬上的就又有了, 所以恩媽我就要加入雙子媽的行列了,這是變化不過也是計畫啦! 現在只希望薛小二不要像當初的薛小恩那麼難搞就好了~~
相簿設定
標籤設定
相簿狀態