support new Date("01JAN2008")
Categories
(Core :: JavaScript: Standard Library, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox120 | --- | fixed |
People
(Reporter: BijuMailList, Assigned: vinny.diehl)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-complete, parity-chrome)
Attachments
(1 file)
Updated•17 years ago
|
Updated•11 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
It seems that in general, alphanumeric/symbolic elements of the string can run up against numeric elements with no whitespace and no problems, however if a number directly precedes an alphabetical char or most symbols, it returns NaN
. I have a patch that relaxes this requirement and doesn't break anything that we have tested for.
Fixing this will also fix Bug 485639.
Assignee | ||
Comment 2•2 years ago
|
||
More specifically, numbers can now run up against the next parsed
element with no problems, so things like "Aug.15.2015" now work as well.
In adding a test for this case, I noticed that the tests for parsing
periods were broken and could not fail the way that they were written,
so I fixed them.
fixes Bug 485639 - for cases like "Aug 15 2015 10:00am"
Updated•2 years ago
|
Updated•2 years ago
|
Comment 6•2 years ago
|
||
Backed out for causing xpcshell failures on test_natural-sort.js.
[task 2023-09-13T09:25:44.967Z] 09:25:44 INFO - TEST-START | devtools/shared/tests/xpcshell/test_natural-sort.js
[task 2023-09-13T09:25:45.331Z] 09:25:45 WARNING - TEST-UNEXPECTED-FAIL | devtools/shared/tests/xpcshell/test_natural-sort.js | xpcshell return code: 0
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-INFO took 360ms
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - >>>>>>>
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - "different values types"
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] number always comes first - true == true
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] number vs numeric string - should remain unchanged (error in chrome) - true == true
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] padding numeric string vs number - true == true
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - "datetime"
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] similar dates - true == true
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] similar dates - true == true
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] javascript toString(), different timezones - true == true
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] Date.toString(), Date.toLocaleString() - true == true
[task 2023-09-13T09:25:45.331Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] Date.toUTCString() - true == true
[task 2023-09-13T09:25:45.332Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] true == true
[task 2023-09-13T09:25:45.332Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] true == true
[task 2023-09-13T09:25:45.332Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] true == true
[task 2023-09-13T09:25:45.332Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] ISO8601 Dates - true == true
[task 2023-09-13T09:25:45.332Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] ISO8601-ish YYYY-MM-DDThh:mm:ss - which does not parse into a Date instance - true == true
[task 2023-09-13T09:25:45.332Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] RFC1123 testing different timezones - true == true
[task 2023-09-13T09:25:45.333Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] unix epoch, Date.getTime() - true == true
[task 2023-09-13T09:25:45.333Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] mixed Date types - true == true
[task 2023-09-13T09:25:45.334Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] "Session" amongst date strings - true == true
[task 2023-09-13T09:25:45.335Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] "Session" amongst date strings (complex) - true == true
[task 2023-09-13T09:25:45.335Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] "Session" amongst strings - true == true
[task 2023-09-13T09:25:45.335Z] 09:25:45 INFO - "version number strings"
[task 2023-09-13T09:25:45.336Z] 09:25:45 INFO - TEST-PASS | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 909] close version numbers - true == true
[task 2023-09-13T09:25:45.336Z] 09:25:45 WARNING - TEST-UNEXPECTED-FAIL | devtools/shared/tests/xpcshell/test_natural-sort.js | compareOptions - [compareOptions : 900] more version numbers
[task 2023-09-13T09:25:45.337Z] 09:25:45 INFO - Element 0 does not match:
[task 2023-09-13T09:25:45.337Z] 09:25:45 INFO - [0] 1.1.100
[task 2023-09-13T09:25:45.337Z] 09:25:45 INFO - [0] 1.1.1 - false == true
[task 2023-09-13T09:25:45.338Z] 09:25:45 INFO - /builds/worker/workspace/build/tests/xpcshell/tests/devtools/shared/tests/xpcshell/test_natural-sort.js:compareOptions:900
[task 2023-09-13T09:25:45.338Z] 09:25:45 INFO - /builds/worker/workspace/build/tests/xpcshell/tests/devtools/shared/tests/xpcshell/test_natural-sort.js:runTest:891
[task 2023-09-13T09:25:45.338Z] 09:25:45 INFO - /builds/worker/workspace/build/tests/xpcshell/tests/devtools/shared/tests/xpcshell/test_natural-sort.js:run_test/<:230
[task 2023-09-13T09:25:45.339Z] 09:25:45 INFO - /builds/worker/workspace/build/tests/xpcshell/tests/devtools/shared/tests/xpcshell/test_natural-sort.js:test:875
[task 2023-09-13T09:25:45.339Z] 09:25:45 INFO - /builds/worker/workspace/build/tests/xpcshell/tests/devtools/shared/tests/xpcshell/test_natural-sort.js:run_test:224
[task 2023-09-13T09:25:45.339Z] 09:25:45 INFO - /builds/worker/workspace/build/tests/xpcshell/head.js:_execute_test:586
[task 2023-09-13T09:25:45.340Z] 09:25:45 INFO - -e:null:1
[task 2023-09-13T09:25:45.340Z] 09:25:45 INFO - exiting test
[task 2023-09-13T09:25:45.340Z] 09:25:45 INFO - <<<<<<<
[task 2023-09-13T09:25:45.343Z] 09:25:45 INFO - TEST-START | toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js
Assignee | ||
Comment 7•2 years ago
|
||
Looks like this tripped up naturalSort()
here because patterns such as 1.1.1
are now parsed as dates. I'll have a patch up once I make sure no other xpcshell tests are busted.
Comment 9•2 years ago
|
||
bugherder |
Comment 10•1 years ago
|
||
hi y'all :) this PR exists to add the outcome of this bug to MDN's FX120 release notes:
https://github.com/mdn/content/pull/29861
tyvm!
Description
•