Date

 

Date 객체는 리터럴 표현이 존재하지 않으며, new 연산자와 생성자 호출을 통해

객체를 생성해야함.

 

Date 객체는 1970년 1월 1일 0시 0분 0초를 기준으로 시간을 관리하며,(epoch time)

Date 객체의 월 지정값을 0~11

 

var d = new Date();
document.writeln(d);//Fri Jan 17 2014 13:17:32 GMT+0900 0 2014 
document.writeln(d.getFullYear());//2014 년
document.writeln(d.getMonth());//1 월 0~11임(0 :1월, 11:12월)
document.writeln(d.getDate());//17 일
document.writeln(d.getDay());//요일(0:일요일 ~ 6:토요일)

var d = new Date('2013/12/10');
var d = new Date(2012, 11, 10, 22, 10, 33, 500);
Posted by 달팽이맛나
,