Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a00c217c
Commit
a00c217c
authored
Oct 10, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Reuse existing calls to get day of week.
parent
2906aaf6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
monthcal.c
dlls/comctl32/monthcal.c
+11
-7
No files found.
dlls/comctl32/monthcal.c
View file @
a00c217c
...
...
@@ -131,10 +131,6 @@ typedef struct
WNDPROC
EditWndProc
;
/* original Edit window procedure */
}
MONTHCAL_INFO
,
*
LPMONTHCAL_INFO
;
/* Offsets of days in the week to the weekday of january 1 in a leap year */
static
const
int
DayOfWeekTable
[]
=
{
0
,
3
,
2
,
5
,
0
,
3
,
5
,
1
,
4
,
6
,
2
,
4
};
static
const
WCHAR
themeClass
[]
=
{
'S'
,
'c'
,
'r'
,
'o'
,
'l'
,
'l'
,
'b'
,
'a'
,
'r'
,
0
};
/* empty SYSTEMTIME const */
...
...
@@ -389,10 +385,18 @@ static void MONTHCAL_CopyDate(const SYSTEMTIME *from, SYSTEMTIME *to)
*/
int
MONTHCAL_CalculateDayOfWeek
(
WORD
day
,
WORD
month
,
WORD
year
)
{
year
-=
(
month
<
3
);
FILETIME
ft
;
SYSTEMTIME
st
;
st
.
wYear
=
year
;
st
.
wMonth
=
month
;
st
.
wDay
=
day
;
st
.
wHour
=
st
.
wMinute
=
st
.
wSecond
=
st
.
wMilliseconds
=
0
;
SystemTimeToFileTime
(
&
st
,
&
ft
);
FileTimeToSystemTime
(
&
ft
,
&
st
);
return
((
year
+
year
/
4
-
year
/
100
+
year
/
400
+
DayOfWeekTable
[
month
-
1
]
+
day
)
%
7
);
return
st
.
wDayOfWeek
;
}
/* properly updates date to point on next month */
...
...
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