--- title: Date.prototype.getMilliseconds() slug: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds tags: - Date - JavaScript - Method - Prototype - Reference translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds ---
getMilliseconds() 메서드는 Date 인스턴스의 밀리초를 현지 시간 기준으로 반환합니다.
dateObj.getMilliseconds()
주어진 날짜의 현지 시간 기준 밀리초를 나타내는 0에서 999 사이의 정수.
getMilliseconds() 사용하기다음 예제에서는 현재 시간의 밀리초를 변수 milliseconds에 할당합니다.
var today = new Date(); var milliseconds = today.getMilliseconds();
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Initial definition. Implemented in JavaScript 1.3. |
| {{SpecName('ES5.1', '#sec-15.9.5.24', 'Date.prototype.getMilliseconds')}} | {{Spec2('ES5.1')}} | |
| {{SpecName('ES6', '#sec-date.prototype.getmilliseconds', 'Date.prototype.getMilliseconds')}} | {{Spec2('ES6')}} | |
| {{SpecName('ESDraft', '#sec-date.prototype.getmilliseconds', 'Date.prototype.getMilliseconds')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.Date.getMilliseconds")}}