日付を取得する
2月 27, 2007 · Posted in javascript
概要
日付を取得する
Java Script
function hirgetDate(){//日付取得
var stoday = new Date();
var syear = stoday.getYear();
if( syear < 1000) syear = syear + 1900;
var smonth = stoday.getMonth()+1;
return {
year: syear ,
month:smonth ,
date:stoday.getDate() ,
hours:stoday.getHours(),
minutes:stoday.getMinutes(),
seconds:stoday.getSeconds()
}
}

