Skip to content

Commit

Permalink
FF122 Date parser parses first three chars of month
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee committed Jan 26, 2024
1 parent fffabde commit 7447db9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions files/en-us/mozilla/firefox/releases/122/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ This article provides information about the changes in Firefox 122 that affect d

- The {{jsxref("ArrayBuffer.prototype.transfer()")}} and {{jsxref("ArrayBuffer.prototype.transferToFixedLength()")}} methods can now be used to [transfer ownership](/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer#transferring_arraybuffers) of memory from one {{jsxref("ArrayBuffer")}} to another. After transfer, the original buffer is detached from its original memory and hence unusable; the state can be checked using {{jsxref("ArrayBuffer.prototype.detached")}}. (See [Firefox bug 1865103](https://bugzil.la/1865103) for more details.)

- For parity with other browsers, [`Date.parse()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse) and the [`Date()` constructor](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date) only consider the first three letters of the specified month when [non-standard date strings](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#non-standard_date_strings) are parsed. Previously only truncated values of the full month name with three or more characters were accepted (See [Firefox bug 1862910](https://bugzil.la/1862910) for more details.)

#### Removals

### SVG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ Date.parse("2014-02-30");
// NaN in Safari and Firefox;
// 1393718400000 in Chrome (Sun Mar 02 2014 00:00:00 GMT+0000)
Date.parse("02/30/2014"); // 1393718400000 in all implementations

// Chrome, Safari, and Firefox 122 and later parse only the first three letters for the month.
// FF121 and earlier parse first three letters and any substring up to the correct month name.
Date.parse("04 Dec 1995"); // Valid all implementations
Date.parse("04 Decem 1995"); // Valid all implementations
Date.parse("04 December 1995"); // Valid all implementations
Date.parse("04 DecFoo 1995"); // NaN in Firefox 121 and earlier. Valid otherwise.
Date.parse("04 De 1995"); // NaN in all implementations
```

## Specifications
Expand Down

0 comments on commit 7447db9

Please sign in to comment.