| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Date/parse | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
Date.parse () 1970 1 1 00:00:00 UTC NaN . ( : 2015-02-31).
ES5 Date.parse . . ( ).
Direct call:
Date.parse(dateString);
Implicit call:
new Date(dateString);
dateStringRFC2822 ISO 8601 ( )
1970 1 1 00:00:00 UTC . NaN .
parse () ( : "Dec 25, 1995") 1970 1 1 00:00:00 UTC . setTime() Date .
parse () . RFC2822 / IETF (RFC2822 3.3) . "Mon, 25 Dec 1995 13:30:00 GMT". , "Mon, 25 Dec 1995 13:30:00 +0430"( 4 30 ) .
GMT UTC . RFC2822 3.3 .
. "2015-10-12 12:00:00" NaN ECMAScript , UTC .
ISO 8601 . , "2011-10-10"( ) "2011-10-10T14 : 48 : 00"( ) . ISO 8601 UTC . ISO 8601 .
1970 1 1 00:00:00 UTC NaN .
parse () Date Date Date.parse () .
"March 7, 2014" parse () "2014-03-07" ISO UTC (ES5 ECMAScript 2015) . Date (UTC) ECMAScript . , .
ECMAScript . String . ISO Date.parse () NaN .
ECMA-262 ISO NaN ( :
// Non-ISO string with invalid date values
new Date("23/25/2014");
Firefox 30 2015 11 25 , Safari 7 . ISO NaN ES5 :
// ISO string with invalid values
new Date("2014-25-23").toISOString();
// returns "RangeError: invalid date" in all es5 compliant browsers
SpiderMonkey jsdate.cpp . "10 06 2014" ISO . .
new Date("10 06 2014");
2014 10 6 2014 6 10 . :
new Date("foo-bar 2014").toString();
// returns: "Invalid Date"
Date.parse("foo-bar 2014");
// returns: NaN
Date.parse()IPOdate Date 1995 8 9 ( ) .
IPOdate.setTime(Date.parse("Aug 9, 1995"));
.
Date.parse("Aug 9, 1995");
ISO GMT-0300 807937200000 local.
Date.parse("Wed, 09 Aug 1995 00:00:00 GMT");
GMT (UTC) 807926400000 .
Date.parse("Wed, 09 Aug 1995 00:00:00");
ISO GMT-0300 807937200000 .
Date.parse("Thu, 01 Jan 1970 00:00:00 GMT");
0 . GMT (UTC) .
Date.parse("Thu, 01 Jan 1970 00:00:00");
ISO GMT-0400 14400000 .
Date.parse("Thu, 01 Jan 1970 00:00:00 GMT-0400");
14400000 . GMT (UTC) .
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-date.parse |
This page was last modified on 2026 7 15 by MDN contributors.
DateDate.prototype.getDate()Date.prototype.getDay()Date.prototype.getFullYear()Date.prototype.getHours()Date.prototype.getMilliseconds()Date.prototype.getMinutes()Date.prototype.getMonth()Date.prototype.getSeconds()Date.prototype.getTime()Date.prototype.getTimezoneOffset()Date.prototype.getUTCDate()Date.prototype.getUTCDay()Date.prototype.getUTCFullYear()Date.prototype.getUTCHours()Date.prototype.getUTCMilliseconds()Date.prototype.getUTCMinutes()Date.prototype.getUTCMonth()Date.prototype.getUTCSeconds()Date.prototype.getYear()Date.prototype.setDate()Date.prototype.setFullYear()Date.prototype.setHours()Date.prototype.setMilliseconds()Date.prototype.setMinutes()Date.prototype.setMonth()Date.prototype.setSeconds()Date.prototype.setTime()Date.prototype.setUTCDate()Date.prototype.setUTCFullYear()Date.prototype.setUTCHours()Date.prototype.setUTCMilliseconds()Date.prototype.setUTCMinutes()Date.prototype.setUTCMonth()Date.prototype.setUTCSeconds()Date.prototype.setYear()Date.prototype.toDateString()Date.prototype.toISOString()Date.prototype.toJSON()Date.prototype.toLocaleDateString()Date.prototype.toLocaleString()Date.prototype.toLocaleTimeString()Date.prototype.toString()toTemporalInstant()Date.prototype.toTimeString()Date.prototype.toUTCString()Date.prototype.valueOf()Date.prototype[@@toPrimitive]Object/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |