谢谢

解决方案 »

  1.   

    星期=(5+A(实际天数))%7实际天数A的计算
    A=B(基本天数)+C(闰日天数)
    B=(计算年-1)*365+(要计算到年的月日天数)
    例:1984年2月1日的基本天数B=(1984-1)*365+(31+1)=723827(天),
    其中,31是1月为31天,1为2月1日为1天。
    公元308年8月28日的基本天数
    B=(308-1)*365+(31+28+31+30+31+30+31+27)=112055+239=112294(天)
    这里的(要计算到年的月日天数),用的是公历,月日天数的规则我好
    象小学就学过了。哈哈……
      

  2.   

    VOID GetLocalTime(
      LPSYSTEMTIME lpSystemTime   // address of system time structure
    );
    SYSTEMTIME
    typedef struct _SYSTEMTIME {  // st 
        WORD wYear; 
        WORD wMonth; 
        WORD wDayOfWeek; //这个变量
        WORD wDay; 
        WORD wHour; 
        WORD wMinute; 
        WORD wSecond; 
        WORD wMilliseconds; 
    } SYSTEMTIME; 
     
    Members:
    wDayOfWeek 
    Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.