aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/javascript/reference/errors/invalid_date/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/javascript/reference/errors/invalid_date/index.html')
-rw-r--r--files/ko/web/javascript/reference/errors/invalid_date/index.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/files/ko/web/javascript/reference/errors/invalid_date/index.html b/files/ko/web/javascript/reference/errors/invalid_date/index.html
new file mode 100644
index 0000000000..32cf041e7e
--- /dev/null
+++ b/files/ko/web/javascript/reference/errors/invalid_date/index.html
@@ -0,0 +1,50 @@
+---
+title: 'RangeError: invalid date'
+slug: Web/JavaScript/Reference/Errors/Invalid_date
+translation_of: Web/JavaScript/Reference/Errors/Invalid_date
+---
+<div>{{jsSidebar("Errors")}}</div>
+
+<h2 id="메시지">메시지</h2>
+
+<pre class="syntaxbox">RangeError: invalid date (Firefox)
+RangeError: invalid time value (Chrome)
+RangeError: Provided date is not in valid range (Chrome)
+</pre>
+
+<h2 id="에러_종류">에러 종류</h2>
+
+<p>{{jsxref("RangeError")}}</p>
+
+<h2 id="무엇이_잘못_된_걸까">무엇이 잘못 된 걸까?</h2>
+
+<p>유효하지 않은 String이 {{jsxref("Date")}} 나 {{jsxref("Date.parse()")}}에 입력되었습니다.</p>
+
+<h2 id="예시">예시</h2>
+
+<h3 id="올바르지_않은_사용_예시">올바르지 않은 사용 예시</h3>
+
+<p>인식 할 수 없는 string이나 잘못된 요소 값을 포함하는 ISO 형식의 날짜 string은 일반적으로 {{jsxref ( "NaN")}}을 반환합니다. 그러나 구현 방식에 따라 ISO 형식 string을 따르지 않는 경우 <code>RangeError: invalid date</code>가 표시 될 수 있습니다. Firefox의 경우:</p>
+
+<pre class="brush: js example-bad">new Date('foo-bar 2014');
+new Date('2014-25-23').toISOString();
+new Date('foo-bar 2014').toString();
+</pre>
+
+<p>그러나 이 경우, Firefox에서는 {{jsxref("NaN")}} 을 반환합니다:</p>
+
+<pre class="brush: js example-bad">Date.parse('foo-bar 2014'); // NaN</pre>
+
+<p>더 자세한 사항은  {{jsxref("Date.parse()")}} 문서를 참고하세요.</p>
+
+<h3 id="올바른_사용_예시">올바른 사용 예시</h3>
+
+<pre class="brush: js example-good">new Date('05 October 2011 14:48 UTC');</pre>
+
+<h2 id="더_보기">더 보기</h2>
+
+<ul>
+ <li>{{jsxref("Date")}}</li>
+ <li>{{jsxref("Date.prototype.parse()")}}</li>
+ <li>{{jsxref("Date.prototype.toISOString()")}}</li>
+</ul>