Date.prototype.setUTCMilliseconds()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
setUTCMilliseconds()
메서드는 표준시에 따라 지정된 날짜의 밀리 초를 설정합니다.
시도해보기
const date1 = new Date("2018-01-24T12:38:29.069Z");
console.log(date1.getUTCMilliseconds());
// Expected output: 69
date1.setUTCMilliseconds(420);
console.log(date1.getUTCMilliseconds());
// Expected output: 420
구문
js
setUTCMilliseconds(millisecondsValue)
매개변수
millisecondsValue
-
밀리 초를 나타내는 0에서 999 사이의 숫자입니다.
반환 값
1970년 1월 1일 00:00:00 UTC와 업데이트 된 날짜 사이의 밀리 초 숫자입니다.
설명
예제
setUTCMilliseconds()
사용하기
js
var theBigDay = new Date();
theBigDay.setUTCMilliseconds(500);
명세
Specification |
---|
ECMAScript® 2025 Language Specification # sec-date.prototype.setutcmilliseconds |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
setUTCMilliseconds |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.