Skip to content

Commit

Permalink
Create dayofweek.c
Browse files Browse the repository at this point in the history
  • Loading branch information
janbodnar committed Feb 1, 2016
1 parent 46dc6af commit 1d6cf6e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions datetime/dayofweek.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 1d6cf6e

Please sign in to comment.