#include <time.h> // 1=Sunday, 2=Monday, 3=Tuesday, ... int dayOFWeek() { time_t now = time(NULL): struct tm here; localtime_r(&now, &here); return here.tm_wday + 1; }
Programming Tips - C/C++: Find the day of the week
Date: 2022nov19
Language: C/C++
Q. C/C++: Find the day of the week
A.