mirror of
https://github.com/janbodnar/Windows-API-examples.git
synced 2026-07-14 10:12:48 -04:00
Create dayofweek.c
This commit is contained in:
parent
46dc6af287
commit
1d6cf6ebc4
15
datetime/dayofweek.c
Normal file
15
datetime/dayofweek.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
#include <wchar.h>
|
||||||
|
|
||||||
|
int wmain(void) {
|
||||||
|
|
||||||
|
SYSTEMTIME st = {0};
|
||||||
|
|
||||||
|
wchar_t *dn[] = { L"Sunday", L"Monday", L"Tuesday",
|
||||||
|
L"Wednesday", L"Thursday", L"Friday", L"Saturday" };
|
||||||
|
|
||||||
|
GetLocalTime(&st);
|
||||||
|
wprintf(L"Today is %ls\n", dn[st.wDayOfWeek]);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user