A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/ko/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString below:

Date.prototype.toISOString() - JavaScript | MDN

Date.prototype.toISOString()

Baseline Widely available

toISOString() 메서드는 단순화한 확장 ISO 형식(ISO 8601)의 문자열을 반환합니다. 반환값은 언제나 24글자 또는 27글자(각각 YYYY-MM-DDTHH:mm:ss.sssZ 또는 ±YYYYYY-MM-DDTHH:mm:ss.sssZ)입니다.시간대는 언제나 UTC이며 접미어 Z로 표현합니다.

시도해 보기
const event = new Date("05 October 2011 14:48 UTC");
console.log(event.toString());
// Expected output: "Wed Oct 05 2011 16:48:00 GMT+0200 (CEST)"
// Note: your timezone may vary

console.log(event.toISOString());
// Expected output: "2011-10-05T14:48:00.000Z"
구문 반환 값

주어진 날짜를 국제표준시 기준 ISO 8601 형식으로 표현한 문자열. Date.parse()에서 인식해야 하는 형식과 동일합니다.

예제 toISOString() 사용하기
const today = new Date("05 October 2011 14:48 UTC");

console.log(today.toISOString()); // Returns 2011-10-05T14:48:00.000Z

위 예제는 비표준 문자열의 분석을 포함하고 있어 Mozilla 외의 브라우저에서는 올바르게 작동하지 않을 수 있습니다.

명세서 브라우저 호환성 같이 보기

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4