JavaScript Date.parse() Method
The Date.parse() static method converts a date string to a timestamp. Only the ISO 8601 format is parsed reliably by every browser.
Description
The Date.parse() static method parses a date string and returns its timestamp, or NaN if it isn't recognized. new Date(string) uses the same parsing. Only the ISO format, such as 2026-11-28 or 2026-11-28T10:00:00Z, is guaranteed to work everywhere; other formats depend on the browser.
Note that a date-only ISO string is treated as UTC, while a date-time string without a time zone is treated as local time.
If you control the format of the dates you're parsing, use ISO strings with an explicit time zone, such as a trailing Z or +10:30, to avoid ambiguity. For other formats, split the string yourself and pass the parts to new Date(year, month - 1, day), or use a date library.
Syntax
Date.parse(dateString)Parameters
- dateStringA string representing a date, ideally in ISO 8601 format.
Return Value
A timestamp in milliseconds, or NaN if the string can't be parsed.
Example
Browser Support
The following information will show you the current browser support for the Date.parse() method. Hover over a browser icon to see the version that first introduced support for this method.
Desktop





Tablets & Mobile





