Simplify ecma_builtin_date_parse function (#3280)
This PR is the preparation of the #2946 issue. (Date.parse() should handle UTC date string format) Changes: - Handle min/max values in ecma_date_parse_date_chars function instead of code duplication - Parse special characters in the new ecma_date_parse_special_char function - Additionally fixed two parsing issue: invalid formats should be refused JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
This commit is contained in:
committed by
Dániel Bátyai
parent
3a505bda6b
commit
55423ab82a
@@ -59,7 +59,9 @@ var wrongFormats = ["",
|
||||
"-02015-01-01",
|
||||
"002015-01-01",
|
||||
"+0002015-01-01",
|
||||
"-0002015-01-01"];
|
||||
"-0002015-01-01",
|
||||
"2015-01T00:00:00.000-03X00",
|
||||
"2015-01-01T00-03:00"];
|
||||
|
||||
for (i in wrongFormats) {
|
||||
var d = Date.parse(wrongFormats[i]);
|
||||
|
||||
Reference in New Issue
Block a user