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
73a0f2c9
Commit
73a0f2c9
authored
Jun 16, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed hour_from_time and week_day functions.
parent
70454967
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
date.c
dlls/jscript/date.c
+12
-2
No files found.
dlls/jscript/date.c
View file @
73a0f2c9
...
@@ -210,19 +210,29 @@ static inline DOUBLE date_from_time(DOUBLE time)
...
@@ -210,19 +210,29 @@ static inline DOUBLE date_from_time(DOUBLE time)
/* ECMA-262 3th Edition 15.9.1.6 */
/* ECMA-262 3th Edition 15.9.1.6 */
static
inline
DOUBLE
week_day
(
DOUBLE
time
)
static
inline
DOUBLE
week_day
(
DOUBLE
time
)
{
{
DOUBLE
ret
;
if
(
isnan
(
time
))
if
(
isnan
(
time
))
return
ret_nan
();
return
ret_nan
();
return
(
int
)(
day
(
time
)
+
4
)
%
7
;
ret
=
fmod
(
day
(
time
)
+
4
,
7
);
if
(
ret
<
0
)
ret
+=
7
;
return
ret
;
}
}
/* ECMA-262 3th Edition 15.9.1.10 */
/* ECMA-262 3th Edition 15.9.1.10 */
static
inline
DOUBLE
hour_from_time
(
DOUBLE
time
)
static
inline
DOUBLE
hour_from_time
(
DOUBLE
time
)
{
{
DOUBLE
ret
;
if
(
isnan
(
time
))
if
(
isnan
(
time
))
return
ret_nan
();
return
ret_nan
();
return
(
int
)
floor
(
time
/
MS_PER_HOUR
)
%
24
;
ret
=
fmod
(
floor
(
time
/
MS_PER_HOUR
),
24
);
if
(
ret
<
0
)
ret
+=
24
;
return
ret
;
}
}
/* ECMA-262 3rd Edition 15.9.1.14 */
/* ECMA-262 3rd Edition 15.9.1.14 */
...
...
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