Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fdd22f19
Commit
fdd22f19
authored
May 03, 2015
by
Thomas Faller
Committed by
Alexandre Julliard
May 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Date.parse: long date with '/' or '-'.
parent
49958f83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
date.c
dlls/jscript/date.c
+8
-1
api.js
dlls/jscript/tests/api.js
+2
-0
No files found.
dlls/jscript/date.c
View file @
fdd22f19
...
...
@@ -2132,7 +2132,7 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
}
}
else
if
(
parse
[
i
]
==
'-'
||
parse
[
i
]
==
'/'
)
{
/* Short date */
/* Short
or long
date */
if
(
set_day
||
set_month
||
set_year
)
break
;
set_day
=
TRUE
;
set_month
=
TRUE
;
...
...
@@ -2152,6 +2152,13 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
if
(
parse
[
i
]
<
'0'
||
parse
[
i
]
>
'9'
)
break
;
year
=
atoiW
(
&
parse
[
i
]);
while
(
parse
[
i
]
>=
'0'
&&
parse
[
i
]
<=
'9'
)
i
++
;
if
(
tmp
>=
70
){
/* long date */
month
=
day
-
1
;
day
=
year
;
year
=
tmp
;
}
}
else
if
(
tmp
<
0
)
break
;
else
if
(
tmp
<
70
)
{
...
...
dlls/jscript/tests/api.js
View file @
fdd22f19
...
...
@@ -2013,6 +2013,8 @@ ok(Date.parse("February 31 UTC, 2000 12:31:17 PM") === 952000277000,
"Date.parse(
\"
February 31 UTC, 2000 12:31:17 PM
\"
) = "
+
Date
.
parse
(
"February 31 UTC, 2000 12:31:17 PM"
));
ok
(
Date
.
parse
(
"71 11:32AM Dec 12 UTC BC "
)
===
-
64346358480000
,
"Date.parse(
\"
71 11:32AM Dec 12 UTC BC
\"
) = "
+
Date
.
parse
(
"71 11:32AM Dec 12 UTC BC "
));
ok
(
Date
.
parse
(
"23/71/2000 11::32::UTC"
)
===
1010662320000
,
"Date.parse(
\"
23/71/2000 11::32::UTC
\"
) = "
+
Date
.
parse
(
"23/71/2000 11::32::UTC"
));
ok
(
Date
.
parse
(
"1970/01/01"
)
===
Date
.
parse
(
"01/01/1970"
),
"Date.parse(
\"
1970/01/01
\"
) = "
+
Date
.
parse
(
"1970/01/01"
));
ok
(
Date
.
parse
(
"71/12/14"
)
===
Date
.
parse
(
"12/14/1971"
),
"Date.parse(
\"
71/12/14
\"
) = "
+
Date
.
parse
(
"71/12/14"
));
ok
(
typeof
(
Math
.
PI
)
===
"number"
,
"typeof(Math.PI) = "
+
typeof
(
Math
.
PI
));
ok
(
Math
.
floor
(
Math
.
PI
*
100
)
===
314
,
"Math.PI = "
+
Math
.
PI
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment