Javascript日付関数
2702 ワード
var currentDate = new Date();
outStr=outStr+"getTime:"+currentDate.getTime()+"<br/>";// ( 1970.1.1 )
outStr=outStr+"getFullYear:"+currentDate.getFullYear()+"<br/>";// (4 ,1970-????)
outStr=outStr+"getMonth:"+currentDate.getMonth()+"<br/>";// (0-11,0 1 )
outStr=outStr+"getDate:"+currentDate.getDate()+"<br/>"; // (1-31)
outStr=outStr+"getDay:"+currentDate.getDay()+"<br/>";// X(0-6,0 )
outStr=outStr+"getHours:"+currentDate.getHours()+"<br/>"; // (0-23)
outStr=outStr+"getMinutes:"+currentDate.getMinutes()+"<br/>";// (0-59)
outStr=outStr+"getSeconds:"+currentDate.getSeconds()+"<br/>";// (0-59)
outStr=outStr+"getMilliseconds:"+currentDate.getMilliseconds()+"<br/>";// (0-999)
outStr=outStr+"toLocaleDateString:"+currentDate.toLocaleDateString()+"<br/>";//
outStr=outStr+"toLocaleTimeString:"+currentDate.toLocaleTimeString()+"<br/>";//
outStr=outStr+"toLocaleString:"+currentDate.toLocaleString()+"<br/>";//