Closed Bug 1686534 Opened 5 years ago Closed 5 years ago

new Date("12-Jan-2021"), using dashes, returns a negative year.

Categories

(Core :: JavaScript: Standard Library, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1439800

People

(Reporter: macielo, Unassigned)

Details

+++ This bug was initially created as a clone of Bug #1439800 +++

new Date("01-Jan-2021")

Date Mon Jan 01 -2021 00:00:00 GMT-0636 (Central Standard Time)

The following alternatives do work:

new Date('2021-01-12T17:00:00Z')

Date Tue Jan 12 2021 11:00:00 GMT-0600 (Central Standard Time)

new Date('12 Jan 2021')

Date Tue Jan 12 2021 00:00:00 GMT-0600 (Central Standard Time)

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.