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
8150960f
Commit
8150960f
authored
Jul 06, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added string argument handling to Date constructor.
parent
45817bf5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
date.c
dlls/jscript/date.c
+4
-5
api.js
dlls/jscript/tests/api.js
+2
-0
No files found.
dlls/jscript/date.c
View file @
8150960f
...
...
@@ -2617,12 +2617,11 @@ static HRESULT DateConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
if
(
FAILED
(
hres
))
return
hres
;
if
(
V_VT
(
&
prim
)
==
VT_BSTR
)
{
FIXME
(
"VT_BSTR not supported
\n
"
);
return
E_NOTIMPL
;
}
if
(
V_VT
(
&
prim
)
==
VT_BSTR
)
hres
=
date_parse
(
V_BSTR
(
&
prim
),
&
num
);
else
hres
=
to_number
(
dispex
->
ctx
,
&
prim
,
ei
,
&
num
);
hres
=
to_number
(
dispex
->
ctx
,
&
prim
,
ei
,
&
num
);
VariantClear
(
&
prim
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/tests/api.js
View file @
8150960f
...
...
@@ -940,6 +940,8 @@ date = new Date(8.64e15+1);
ok
(
isNaN
(
0
+
date
.
getTime
()),
"date.getTime() is not NaN"
);
date
=
new
Date
(
Infinity
);
ok
(
isNaN
(
0
+
date
.
getTime
()),
"date.getTime() is not NaN"
);
date
=
new
Date
(
"3 July 2009 22:28:00 UTC+0100"
);
ok
(
date
.
getTime
()
===
1246656480000
,
"date.getTime() = "
+
date
.
getTime
());
date
=
new
Date
(
1984
,
11
,
29
,
13
,
51
,
24
,
120
);
ok
(
date
.
getFullYear
()
===
1984
,
"date.getFullYear() = "
+
date
.
getFullYear
());
ok
(
date
.
getMonth
()
===
11
,
"date.getMonth() = "
+
date
.
getMonth
());
...
...
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