mirror of
https://github.com/bellard/quickjs.git
synced 2025-11-15 18:22:15 +03:00
stricter year parsing in Date
This commit is contained in:
2
TODO
2
TODO
@@ -63,4 +63,4 @@ Test262o: 0/11262 errors, 463 excluded
|
|||||||
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
|
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
|
||||||
|
|
||||||
Test262:
|
Test262:
|
||||||
Result: 63/83149 errors, 1645 excluded, 5538 skipped
|
Result: 61/83149 errors, 1645 excluded, 5538 skipped
|
||||||
|
|||||||
@@ -53839,11 +53839,11 @@ static BOOL js_date_parse_otherstring(const uint8_t *sp,
|
|||||||
*is_local = FALSE;
|
*is_local = FALSE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (p - p_start > 2) {
|
if (p - p_start > 2 && !has_year) {
|
||||||
fields[0] = val;
|
fields[0] = val;
|
||||||
has_year = TRUE;
|
has_year = TRUE;
|
||||||
} else
|
} else
|
||||||
if (val < 1 || val > 31) {
|
if ((val < 1 || val > 31) && !has_year) {
|
||||||
fields[0] = val + (val < 100) * 1900 + (val < 50) * 100;
|
fields[0] = val + (val < 100) * 1900 + (val < 50) * 100;
|
||||||
has_year = TRUE;
|
has_year = TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ test262/test/annexB/language/expressions/assignmenttargettype/callexpression.js:
|
|||||||
test262/test/annexB/language/expressions/assignmenttargettype/cover-callexpression-and-asyncarrowhead.js:20: SyntaxError: invalid assignment left-hand side
|
test262/test/annexB/language/expressions/assignmenttargettype/cover-callexpression-and-asyncarrowhead.js:20: SyntaxError: invalid assignment left-hand side
|
||||||
test262/test/language/identifier-resolution/assign-to-global-undefined.js:20: strict mode: expected error
|
test262/test/language/identifier-resolution/assign-to-global-undefined.js:20: strict mode: expected error
|
||||||
test262/test/language/module-code/top-level-await/rejection-order.js:20: TypeError: $DONE() not called
|
test262/test/language/module-code/top-level-await/rejection-order.js:20: TypeError: $DONE() not called
|
||||||
test262/test/staging/sm/Date/two-digit-years.js:26: Test262Error: Expected SameValue(«915177600000», «NaN») to be true
|
|
||||||
test262/test/staging/sm/Date/two-digit-years.js:26: strict mode: Test262Error: Expected SameValue(«915177600000», «NaN») to be true
|
|
||||||
test262/test/staging/sm/Function/arguments-parameter-shadowing.js:14: Test262Error: Expected SameValue(«true», «false») to be true
|
test262/test/staging/sm/Function/arguments-parameter-shadowing.js:14: Test262Error: Expected SameValue(«true», «false») to be true
|
||||||
test262/test/staging/sm/Function/constructor-binding.js:11: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true
|
test262/test/staging/sm/Function/constructor-binding.js:11: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true
|
||||||
test262/test/staging/sm/Function/constructor-binding.js:11: strict mode: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true
|
test262/test/staging/sm/Function/constructor-binding.js:11: strict mode: Test262Error: Expected SameValue(«"function"», «"undefined"») to be true
|
||||||
|
|||||||
Reference in New Issue
Block a user