i want to show Day Of Week, can you help me? here my code but showed: hour, minutes, seconds, date, month, year from my laptop( i guess it).
bool getTime(const char *str)
{
int Hour, Min, Sec;
here is my code Get DAYOFWEEK
void Thungay(){
month2 = month1;
year2 = year1;
if (month2 < 3)
{month2 +=12;
--year2;}
wday =( (day1 + (13 * month2 - 27) / 5 + year2 + year2/4 - year2/100 + year2/400) % 7) +1;
}
but i want to get tm.Wday from my laptop.
can you tell me how i use it
makeTime(tm);
Convert normal date & time to a time_t number. The time_t number is returned. The tm input is a TimeElements variable type, which has these fields:
tm.Second Seconds 0 to 59
tm.Minute Minutes 0 to 59
tm.Hour Hours 0 to 23
tm.Wday Week Day 0 to 6 (not needed for mktime)
tm.Day Day 1 to 31
tm.Month Month 1 to 12
tm.Year Year 0 to 99 (offset from 1970)