函数如下:

代入参数年y,月m,日d 即可返回所得的星期
C# 中返回星期的函数public static string getWeekDay(int y, int m, int d)
if(m==1) {m=13;y--;}
                if(m==2) {m=14;y--;}
   
              
int week = (d + 2 * m + 3 * (m + 1/ 5 + y + y / 4 - y / 100 + y/400% 7 + 1;
C# 中返回星期的函数                
string strweek="";
C# 中返回星期的函数                
switch (week)
 

相关文章:

  • 2022-02-08
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-01-17
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案