Closed Bug 1410019 Opened 7 years ago Closed 4 years ago

Suggested implicit call of 'Date.parse' method is incorrect

Categories

(Developer Documentation Graveyard :: General, enhancement, P5)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ruvim.pinka, Unassigned)

References

()

Details

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

On the mentioned manual page the two variants to call `parse` method are suggested: direct call and implicit call.
But these variants return different values:

Date.parse(dateString) returns number.
new Date(dateString) returns object.

Why do you suggest the second variant as alternative for the first one?

Perhaps the following variant should be used as alternative instead:
new Date(dateString).getTime()
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.