³¯Â¥¿Í ½Ã°£À» ±âº»À¸·Î ÀúÀåÇϰųª °¡Á®¿Ã ¼ö ÀÖ´Ù.

Script =new Date();
=new Date(dateVal);
=new Date(year,month,date[,hours[,minutes[,seconds[,ms]]]]);
HTML ¾ø´Ù.
Àμö
(ÀÏÀÚ°³Ã¼)
ÇʼöÀûÀÎ ¿ä¼ÒÀ̸ç Date °³Ã¼°¡ ÇÒ´çµÇ´Â º¯¼ö À̸§ÀÌ´Ù.
dateVal (ÀÏÀÚ°ª)
ÇʼöÀûÀÎ ¿ä¼ÒÀÌ¸ç ¼öÄ¡°ªÀ̸é dateValÀº 1970³â 1¿ù 1ÀÏ ÀÚÁ¤ºÎÅÍ ÁÖ¾îÁø ³¯Â¥ »çÀÌÀÇ ½Ã°£À» ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)·Î ¹Ð¸®ÃʱîÁö ³ªÅ¸³»°í, ¹®ÀÚ¿­À̸é dateValÀº parse ¸Þ¼­µåÀÇ ±ÔÄ¢¿¡ µû¶ó ±¸¹® ºÐ¼®µÈ´Ù. dateVal Àμö´Â ÀϺΠActiveX® °³Ã¼¿¡¼­ ¹ÝȯµÈ VT_DATE °ªÀÏ ¼öµµ ÀÖ´Ù.
year (³âµµ)
ÇʼöÀûÀÎ ¿ä¼ÒÀÌ¸ç ¿¹¸¦µé¾î 76ÀÌ ¾Æ´Ï¶ó 1976ó·³ Àüü ¿¬µµ·Î ³ªÅ¸³½´Ù.
month (¿ù)
ÇʼöÀûÀÎ ¿ä¼ÒÀÌ¸ç ¿ùÀº 0ºÎÅÍ 11±îÁöÀÇ Á¤¼ö(1¿ùºÎÅÍ 12¿ù)·Î ³ªÅ¸³½´Ù.
date (³¯Â¥)
ÇʼöÀûÀÎ ¿ä¼ÒÀÌ¸ç ³¯Â¥´Â 1ºÎÅÍ 31±îÁöÀÇ Á¤¼ö·Î ³ªÅ¸³½´Ù.
hours (½Ã°£)
¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç. minutes¸¦ »ç¿ëÇÏ¸é ¹Ýµå½Ã ÀÔ·ÂÇØ¾ß ÇÑ´Ù. ½Ã°£Àº 0ºÎÅÍ 23±îÁö(ÀÚÁ¤ºÎÅÍ ¿ÀÈÄ 11½Ã)ÀÇ Á¤¼ö·Î ³ªÅ¸³½´Ù.
minutes (ºÐ)
¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç seconds¸¦ »ç¿ëÇÏ¸é ¹Ýµå½Ã ÀÔ·ÂÇØ¾ß ÇÑ´Ù. ºÐÀº 0ºÎÅÍ 59±îÁöÀÇ Á¤¼ö·Î ³ªÅ¸³½´Ù.
seconds (ÃÊ)
¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç milliseconds¸¦ »ç¿ëÇÏ¸é ¹Ýµå½Ã ÀÔ·ÂÇØ¾ß ÇÑ´Ù. ÃÊ´Â 0ºÎÅÍ 59±îÁöÀÇ Á¤¼ö·Î ³ªÅ¸³½´Ù.
ms (1/1000ÃÊ)
¼±ÅÃÀûÀÎ ¿ä¼ÒÀÌ¸ç ¹Ð¸®ÃÊ´Â 0ºÎÅÍ 999±îÁöÀÇ Á¤¼ö·Î ³ªÅ¸³½´Ù.
¼³¸í

Date °³Ã¼´Â ¹Ð¸®ÃÊ ´ÜÀ§±îÁö ƯÁ¤ ½Ã°£À» ³ªÅ¸³»´Â ¼ýÀÚ·Î µÇ¾îÀÖ´Ù. Àμö°ªÀÌ Á¤ÇØÁø Àμö°ªÀÇ ¹üÀ§º¸´Ù Å©°Å³ª À½¼öÀ̸é ÀúÀåµÈ ´Ù¸¥ °ªÀº ±×¿¡ µû¶ó ÀÚµ¿ÀûÀ¸·Î ¼öÁ¤µÈ´Ù. ¿¹¸¦µé¾î 150ÃÊ°¡ ÁöÁ¤µÈ´Ù¸é Javascript´Â 2ºÐ 30ÃÊ·Î ÀçÁ¤ÀÇÇÑ´Ù.
Javascript¸¦ ÅëÇÏ¿© ÀÏÀÚÀÇ °è¼±µî ÇÁ·Î±×·¥À» ¼öÇàÇÏ°Ô ÇÒ ¼ö ÀÖ´Ù

Date °³Ã¼¿¡ ³ªÅ¸³¾ ¼ö ÀÖ´Â ³¯Â¥ ¹üÀ§´Â 1970³â 1¿ù 1ÀϺÎÅÍ ÀüÈÄ·Î ¾à 285,616³âÀÌ´Ù.
Á»´õ Á¤È®½Ã ¸»Çϸé UTC 1970/01/01/00:00:00:000 ±100,000,000 ÀÏÀÌ´Ù.

ÇØ´ç ¼ýÀÚ°¡ NaNÀÌ¸é ±× °³Ã¼´Â ƯÁ¤ ½Ã°£À» Ç¥½ÃÇÏÁö ¸øÇÑ´Ù. Date °³Ã¼¿¡ ¸Å°³ º¯¼ö¸¦ Àü´ÞÇÏÁö ¾ÊÀ¸¸é ÇöÀç ½Ã°£(UTC)À¸·Î ÃʱâÈ­µÈ´Ù. ¸ÕÀú °³Ã¼¿¡ °ªÀ» ÁöÁ¤ÇØ¾ß °³Ã¼¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.

Date °³Ã¼´Â Date °³Ã¼¸¦ ¸¸µéÁö ¾Ê°í È£ÃâµÇ´Â parse¿Í UTC µÎ°¡ÁöÀÇ ¸Þ¼­µå Á¤Àû ¸Þ¼­µå¸¦ °¡Áø´Ù.

»ý¼º

Date °³Ã¼´Â Date.constructor ¼Ó¼ºÀ¸·Î »ý¼ºÇÑ´Ù.

=new Date()
Date.parse ¸Þ¼­µå¿¡ ÀÇÇÏ¿© ÀÏÀÚ ¹®ÀÚ¿­À» ¸¸µé ¼ö ÀÖ°í, .toLocaleString ¸Þ¼­µå¸¦ ÀÌ¿ëÇÏ¿© Áö¿ª½Ã°£ ¹®ÀÚ¿­À» ¸¸µé¼ö ÀÖ´Ù. ±â°è¿¡ ¼³Á¤µÇ¾î ÀÖ´Â ÀÏÀÚ¿Í ½Ã°£À» ¹ÝȯÇÑ´Ù.



¼³¸íÀ» À§ÇÑ ÇöÀç ½Ã°¢ Ãâ·ÂÇϱ⠿¹Á¦

<SCRIPT>
var weekstr='ÀÏ¿ùÈ­¼ö¸ñ±ÝÅä'; // ¿äÀÏ ½ºÆ®¸µ
now=new Date(); // ÇöÀç½Ã°£ °¡Á®¿À±â
year=now.getYear(); // ³âµµ °¡Á®¿À±â
month=now.getMonth(); // ¿ù °¡Á®¿À±â (+1)
date=now.getDate(); // ³¯Â¥ °¡Á®¿À±â
hour=now.getHours(); // ½Ã°£ °¡Á®¿À±â
min=now.getMinutes(); // ºÐ °¡Á®¿À±â
sec=now.getSeconds(); // ÃÊ °¡Á®¿À±â
mils=now.getMilliseconds(); // ¹Ð¸®ÃÊ °¡Á®¿À±â
wkday=now.getDay(); // ¿äÀϼöÄ¡ °¡Á®¿À±â 0=ÀÏ, 1=¿ù,...
document.write(year+'³â '+(month+1)+'¿ù '+date+'ÀÏ('+weekstr.substr(wkday,1)+') ');
document,write(hour+'½Ã '+min+'ºÐ '+sec+'ÃÊ:'+mils+'ms'); // ½ºÆ®¸µÀ¸·Î °áÇÕÇÏ¿© Ãâ·ÂÇϱâ
</SCRIPT>

ÀÏÀÚ °è»êÇϱ⠿¹Á¦

<SCRIPT>
var weekstr='ÀÏ¿ùÈ­¼ö¸ñ±ÝÅä'; // ¿äÀÏ ½ºÆ®¸µ
daygap=2000; // ¼³Á¤µÈ ÀÏÀÚ Â÷ÀÌ
now=newday=new Date(); // ÇöÀç½Ã°£ °¡Á®¿À±â
newDay.setDate(now.getDate()+daygap); // ÇöÀç ÀÏÀÚ¿¡¼­ ³¯Â¥¸¦ °¡Á®´Ù °£°ÝÀϼö ¸¸Å­ ´õÇؼ­ »õ·Î¿î ÀÏÀÚ¿¡ ³ÖÀ½
newyy=newDay.getYear(); // »õ·Î¿î ÀÏÀÚ¿¡¼­ ³âµµ °¡Á®¿À±â
newmm=newDay.getMonth()+1; // »õ·Î¿î ÀÏÀÚ¿¡¼­ ¿ù °¡Á®¿À±â (+1)
newdd=newDay.getDate();// »õ·Î¿î ÀÏÀÚ¿¡¼­ ³¯Â¥ °¡Á®¿À±â
newww=weekstr.substr(newDay.getDay(),1); // ¿äÀϼöÄ¡ °¡Á®¿Í¼­(0=ÀÏ, 1=¿ù,...) ÇØ´ç ½ºÆ®¸µÀ¸·Î ȯ»ê
document.write('ÇöÀçºÎÅÍ '+daygap+'ÀÏ ÈÄ´Â'+newyy+'³â '+newmm+'¿ù '+newdd+'ÀÏ('+newww+'¿äÀÏ)<BR>');
  // ½ºÆ®¸µÀ¸·Î °áÇÕÇÏ¿© Ãâ·ÂÇϱâ
</SCRIPT>

¿¹Á¦constructor ¼Ó¼º IE3.02 NS3
¢¡ Date °³Ã¼ÀÇ prototypeÀ» ¸¸µå´Â ±â´ÉÇÔ¼ö¸¦ ¹ÝȯÇϰųª ÁöÁ¤ÇÑ´Ù.
¹®¹ý: .constructor[=newConstructor]
ÄÚµå: myDate=new Date(); document.write(myDate.constructor °á°ú:
length ¼Ó¼º IE4 NS4
¢¡ ÀÏÀÚÀÇ ±æÀ̸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .length[=newLength]
ÄÚµå: document.write(Date.length) °á°ú:
¿¹Á¦prototype ¼Ó¼º IE4 NS3
¢¡ ¼³Á¤ÀÚ°¡ ¸Þ¼­µå¿Í ¼Ó¼ºµéÀ» Ãß°¡ÇÒ ¼ö ÀÖ´Â °³Ã¼ÀÇ Å¬·¡½ºÀÇ Ãʱ⠼³Á¤¿¡ ´ëÇÑ prototypeÀ» ³ªÅ¸³»¸ç ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù. Object.prototype ȤÀº Function.prototype ¼Ó¼ºÀ» Âü°íÇ϶ó.
¹®¹ý: .prototype[=newPrototype]
ÄÚµå: myDate=new Date();function check(){return myDate}document.write(Date.prototype.myDate=check)
°á°ú:
ÄÚµå: myDate=new Date();function check(){return myDate}document.write(Date.prototype.myDate=check)

getDate ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÀÏÀÚ °ª(1ºÎÅÍ 31±îÁöÀÇ Á¤¼ö)À» ¹ÝȯÇÑ´Ù.
¹®¹ý: .getDate()
ÄÚµå: now=new Date();document.write(now.getDate()) °á°ú:
getDay ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¿äÀÏ °ª(0 ~ 6) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù. ÀÏ¿äÀÏÀÌ 0ÀÌ´Ù.
¹®¹ý: .getDay()
ÄÚµå: now=new Date();document.write(now.getDay()) °á°ú:
getFullYear ¸Þ¼­µå IE4 NS4
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ³âµµ °ªÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: .getFullYear()
ÄÚµå: now=new Date();document.write(now.getFullYear()) °á°ú:
getHours ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ½Ã°£ °ª(0 ~ 23) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getHours()
ÄÚµå: now=new Date();document.write(now.getHours()) °á°ú:
getMilliseconds ¸Þ¼­µå IE4 NS4
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¹Ð¸®ÃÊ °ª(0 ~ 999) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getMilliseconds()
ÄÚµå: now=new Date();document.write(now.getMilliseconds()) °á°ú:
getMinutes ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ºÐ °ª(0 ~ 59) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getMinutes()
ÄÚµå: now=new Date();document.write(now.getMinutes()) °á°ú:
getMonth ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¿ù °ª(0 ~ 11) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù. 0Àº 1¿ù, 11Àº 12¿ùÀÌ´Ù.
¹®¹ý: .getMonth()
ÄÚµå: now=new Date();document.write(now.getMonth()) °á°ú:
getSeconds ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÃÊ °ª(0 ~ 59) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getSeconds()
ÄÚµå: now=new Date();document.write(now.getSeconds()) °á°ú:
getTime ¸Þ¼­µå IE3.02 NS2
¢¡ 1970³â 1¿ù 1ÀÏ ÀÚÁ¤°ú Date °³Ã¼ÀÇ ½Ã°£ °ª »çÀÌÀÇ ½Ã°£À» ¹Ð¸®ÃÊ ´ÜÀ§·Î ³ªÅ¸³»´Â Á¤¼ö °ªÀ» ¹ÝȯÇÑ´Ù
¹®¹ý: .getTime()
ÄÚµå: now=new Date();document.write(now.getTime()) °á°ú:
getTimezoneOffset ¸Þ¼­µå IE3.02 NS2
¢¡ È£½ºÆ® ÄÄÇ»ÅÍÀÇ ½Ã°£(Áö¿ª½Ã°£)°ú ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC : Greenwich Ç¥ÁؽÃ) »çÀÌÀÇ ½Ã°£Â÷¸¦ ºÐÀ¸·Î ¹ÝȯÇÑ´Ù.
ÀÏÁ¶½Ã°£ Àý¾àÁ¦(Daylight Saving Time) ¶§¹®¿¡ Ç×»ó ÀÏÁ¤ÇÏÁö´Â ¾Ê´Ù.
¹®¹ý: .getTimezoneOffset()
ÄÚµå: now=new Date();document.write(now.getTimezoneOffset()+' | '+now.getTimezoneOffset()/60+'½Ã°£') °á°ú:
getUTCDate ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÀÏÀÚ °ª(1 ~ 31) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getUTCDate()
ÄÚµå: now=new Date();document.write(now.getUTCDate()) °á°ú:
getUTCDay ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¿äÀÏ °ª(0 ~ 6) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù. ÀÏ¿äÀÏÀÌ 0ÀÌ´Ù.
¹®¹ý: .getUTCDay()
ÄÚµå: now=new Date();document.write(now.getUTCDay()) °á°ú:
getUTCFullYear ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ³âµµ °ªÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: .getUTCFullYear()
ÄÚµå: now=new Date();document.write(now.getUTCFullYear()) °á°ú:
getUTCHours ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ½Ã°£ °ª(0 ~ 23) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getUTCHours()
ÄÚµå: now=new Date();document.write(now.getUTCHours()) °á°ú:
getUTCMilliseconds ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¹Ð¸®ÃÊ °ª(0 ~ 999) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getUTCMilliseconds()
ÄÚµå: now=new Date();document.write(now.getUTCMilliseconds()) °á°ú:
getUTCMinutes ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ºÐ °ª(0 ~ 59) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getUTCMinutes()
ÄÚµå: now=new Date();document.write(now.getUTCMinutes()) °á°ú:
getUTCMonth ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¿ù °ª(0 ~ 11) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù. 0Àº 1¿ù, 11Àº 12¿ùÀÌ´Ù.
¹®¹ý: .getUTCMonth
ÄÚµå: now=new Date();document.write(now.getUTCMonth()) °á°ú:
getUTCSeconds ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÃÊ °ª(0 ~ 59) Á¤¼ö¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .getUTCSeconds()
ÄÚµå: now=new Date();document.write(now.getUTCSeconds()) °á°ú:
getVarDate ¸Þ¼­µå IE4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ VT_DATE °ªÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: .getVarDate()
ÄÚµå: now=new Date();document.write(now.getVarDate()) °á°ú:
getYear ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ³âµµ °ªÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: .getYear()
ÄÚµå: now=new Date();document.write(now.getYear()) °á°ú:
parse ¸Þ¼­µå IE3.02 NS2
¢¡ ÀÏÀÚ¸¦ Æ÷ÇÔÇÑ ¹®ÀÚ¿­ ±¸¹®À» ºÐ¼®ÇÏ¿© 1970³â 1¿ù 1ÀÏ ÀÚÁ¤ºÎÅÍ ÇØ´ç ÀÏÀÚ »çÀÌÀÇ ½Ã°£À» ¹Ð¸®ÃÊ·Î ¹ÝȯÇÑ´Ù.
¹®¹ý: Date.parsedateString
ÄÚµå: document.write(Date.parse('Fri Jan 24 15:17:20 UTC+0900 2003')) °á°ú:
¿¹Á¦setDate ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÀÏÀÚ °ª(1 ~ 31)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setDate(dateVal)
ÄÚµå: now=new Date();now.setDate(22);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setFullYear ¸Þ¼­µå IE4 NS4
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ³âµµ °ªÀ» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setFullYear(yearVal [,monthVal,dayVal])
ÄÚµå: now=new Date();now.setFullYear(2222);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setHours ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ½Ã°£ °ª(0 ~ 23)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setHours(hoursVal[,minutesVal,secondsVal,msVal])
ÄÚµå: now=new Date();now.setHours(22);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setMilliseconds ¸Þ¼­µå IE4 NS4
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¹Ð¸®ÃÊ °ª(0 ~ 999)À» ¼³Á¤ÇÑ´Ù.
1000À» ÃÊ°úÇϸé ÀÚµ¿ÀûÀ¸·Î °è»êÇÏ¿© ÃÊ, ºÐµî »óÀ§ ½Ã°£À» Áõ°¡½ÃŲ´Ù.
¹®¹ý: .setMilliseconds(millisecondsVal)
ÄÚµå: now=new Date();now.setMilliseconds(99);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setMinutes ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ºÐ °ª(0 ~ 59)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setMinutes(minutesVal[,secondsVal,msVal])
ÄÚµå: now=new Date();now.setMinutes(22,0,0);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setMonth ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¿ù °ª(0 ~ 11)À» ¼³Á¤ÇÑ´Ù. 0Àº 1¿ù, 11Àº 12¿ùÀÌ´Ù.
¹®¹ý: .setMonth(monthVal[,dayVal])
ÄÚµå: now=new Date();now.setMonth(11,11);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setSeconds ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÃÊ °ª(0 ~ 59)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setSeconds(secondsVal[,msVal)
ÄÚµå: now=new Date();now.setSeconds(33,333);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setTime ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÀÏÀÚ¿Í ½Ã°£ °ªÀ» GMT 1970³â 1¿ù 1ÀÏ ÀÚÁ¤ºÎÅÍ °æ°úµÈ ½Ã°£À» ¹Ð¸®ÃÊ·Î ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setTime(timeVal)
ÄÚµå: now=new Date();now.setTime(1234561290);document.write(now.toLocaleString()) °á°ú:
¿¹Á¦setUTCDate ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÀÏÀÚ °ª(1 ~ 31)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setUTCDate(dateVal)
ÄÚµå: now=new Date();now.setUTCDate(11);document.write(now) °á°ú:
¿¹Á¦setUTCFullYear ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ³âµµ °ªÀ» ¼³Á¤ÇÑ´Ù.
¹®¹ý: document.getSelection()
ÄÚµå: now=new Date();now.setUTCFullYear(3000);document.write(now) °á°ú:
¿¹Á¦setUTCHours ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ½Ã°£ °ª(0 ~ 23)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setUTCHours(hoursVal[,minutesVal,secondsVal,msVal])
ÄÚµå: now=new Date();now.setUTCHours(11,11,11,11);document.write(now) °á°ú:
¿¹Á¦setUTCMilliseconds ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¹Ð¸®ÃÊ °ª(0 ~ 999)À» ¼³Á¤ÇÑ´Ù.
1000À» ÃÊ°úÇϸé ÀÚµ¿ÀûÀ¸·Î °è»êÇÏ¿© ÃÊ, ºÐµî »óÀ§ ½Ã°£À» Áõ°¡½ÃŲ´Ù.
¹®¹ý: .setUTCMilliseconds(millisecondsVal)
ÄÚµå: now=new Date();now.setMilliseconds(000);document.write(now) °á°ú:
¿¹Á¦setUTCMinutes ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ºÐ °ª(0 ~ 59)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setUTCMinutes(minutesVal[,secondsVal,msVal])
ÄÚµå: now=new Date();now.setUTCMinutes(11,11,11);document.write(now) °á°ú:
¿¹Á¦setUTCMonth ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¿ù °ª(0 ~ 11)À» ¼³Á¤ÇÑ´Ù. 0Àº 1¿ù, 11Àº 12¿ùÀÌ´Ù.
¹®¹ý: .setUTCMonth(monthVal[,dayVal])
ÄÚµå: now=new Date();now.setUTCMonth(11,11);document.write(now) °á°ú:
¿¹Á¦setUTCSeconds ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ÃÊ °ª(0 ~ 59)À» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setUTCSeconds(secondsVal[,msVal)
ÄÚµå: now=new Date();now.setUTCSeconds(11,11);document.write(now) °á°ú:
¿¹Á¦setYear ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ³âµµ °ªÀ» ¼³Á¤ÇÑ´Ù.
¹®¹ý: .setYear(yearVal)
ÄÚµå: now=new Date();now.setYear(22);document.write(now.toLocaleString()) °á°ú:
toDateString ¸Þ¼­µå IE5.5 NS6
¢¡ ½Ã°£À» ¹®ÀÚ¿­·Î º¯È¯µÈ ÀÏÀÚ¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .toDateString()
ÄÚµå: now=new Date();document.write(now.toDateString()) °á°ú:
toGMTString ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÁö½Ã°£À» ±×¸®´ÏÄ¡ Ç¥ÁؽÃ(GMT)¸¦ »ç¿ëÇÏ¿© ¹®ÀÚ¿­·Î º¯È¯µÈ ÀÏÀÚ¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .toGMTString()
ÄÚµå: now=new Date();document.write(now.toGMTString()) °á°ú:
toLocaleDateString ¸Þ¼­µå IE5.5 NS6
¢¡ ÇöÀç ÀÏÀÚ¸¦ ·ÎÄÉÀÏÀ» »ç¿ëÇÏ¿© ¹®ÀÚ¿­·Î ¹ÝȯÇÑ´Ù.
¹®¹ý: .toLocaleDateString()
ÄÚµå: now=new Date();document.write(now.toLocaleDateString()) °á°ú:
toLocaleString ¸Þ¼­µå IE3.02 NS2
¢¡ ÇöÀç ÀÏÀÚ¿Í ½Ã°£À» ·ÎÄÉÀÏÀ» »ç¿ëÇÏ¿© ¹®ÀÚ¿­·Î ¹ÝȯÇÑ´Ù.
¹®¹ý: .toLocaleString()
ÄÚµå: now=new Date();document.write(now.toLocaleString()) °á°ú:
toLocaleTimeString ¸Þ¼­µå IE5.5 NS6
¢¡ ÇöÀç ½Ã°£À» ·ÎÄÉÀÏÀ» »ç¿ëÇÏ¿© ¹®ÀÚ¿­·Î ¹ÝȯÇÑ´Ù.
¹®¹ý: .toLocaleTimeString()
ÄÚµå: now=new Date();document.write(now.toLocaleTimeString()) °á°ú:
toSource ¸Þ¼­µå IE4 NS4.06
¢¡ ÁöÁ¤µÈ Date °³Ã¼¸¦ »ý¼ºÇϴµ¥ »ç¿ëµÈ ¼Ò½ºÄڵ带 ¹ÝȯÇÏ°í, ÀϹÝÀûÀ¸·Î JavaScript¿¡ ÀÇÇØ Á÷Á¢ È£ÃâµÈ´Ù.
»õ·ÎÀº °³Ã¼¸¦ ¸¸µé¼ö ÀÖÀ¸¸ç, ÀÌ´Â Object.toSource ¸Þ¼­µå¸¦ µ¤¾î¾º¿î´Ù.
¹®¹ý: .toSource()
¿¹Á¦toString ¸Þ¼­µå IE3.02 NS2
¢¡ Date °³Ã¼¸¦ ³ªÅ¸³»´Â ¹®ÀÚ¿­À» ¹ÝȯÇÑ´Ù.
¹®¹ý: .toString()
ÄÚµå: now=new Date();document.write(now.toString()) °á°ú:
toTimeString ¸Þ¼­µå IE5.5 NS6
¢¡ ÇöÀç ½Ã°£À» Ç¥Áؽð£À» »ç¿ëÇÏ¿© ½Ã°£ ¹®ÀÚ¿­·Î ¹ÝȯÇÑ´Ù.
¹®¹ý: .toTimeString()
ÄÚµå: now=new Date();document.write(now.toTimeString()) °á°ú:
toUTCString ¸Þ¼­µå IE4 NS4
¢¡ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC)¸¦ »ç¿ëÇÏ¿© ¹®ÀÚ¿­·Î º¯È¯µÈ ÀÏÀÚ¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: .toUTCString()
ÄÚµå: now=new Date();document.write(now.toUTCString()) °á°ú:
¿¹Á¦UTC ¸Þ¼­µå IE3.02 NS2
¢¡ Date °³Ã¼ÀÇ ÇùÁ¤ ¼¼°è Ç¥ÁؽÃ(UTC) ¶Ç´Â ±×¸®´ÏÄ¡ Ç¥ÁؽÃ(GMT) 1970³â 1¿ù 1ÀÏ ÀÚÁ¤ºÎÅÍ ÁÖ¾îÁø ÀÏÀÚ »çÀÌÀÇ ½Ã°£À» ¹Ð¸®ÃÊ °ªÀ¸·Î ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
DateÀÇ static ¸Þ¼­µåÀ̹ǷΠobjectName.UTC()°¡ ¾Æ´Ï¶ó Ç×»ó Date.UTC()¸¦ »ç¿ëÇÏ¿©¾ß ÇÑ´Ù.
¹®¹ý: .UTC(year,month,day[,hours,minutes,seconds,ms])
ÄÚµå: now=Date.UTC(2000,11,11,11,11,11,11);document.write(now) °á°ú:
ÄÚµå: document.write(Date.UTC()) °á°ú:
¿¹Á¦valueOf ¸Þ¼­µå IE4 NS3
¢¡ ÁöÁ¤ÇÑ Date °³Ã¼ÀÇ ¿ø½Ã°ªÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: .valueOf()
ÄÚµå: now=Date.UTC(2000,11,11,11,11,11,11);document.write(now.valueOf()) °á°ú: