
算法
文章平均质量分 69
ling091
这个作者很懒,什么都没留下…
展开
-
计算某一天属于一年中的第几周
详细介绍见 Calculating the ISO week number. Jan Stout. http://www.proesite.com/timex/wkcalc.htm Simple week number的定义如下: 1. 第一周开始于该年的一月一号 2. 第n+1周开始于第n周后的7天 SWN( y, m, d ) = 1 + ( DP( y, m ) +转载 2012-02-21 16:04:38 · 1267 阅读 · 0 评论 -
时区转换函数
typedef struct { int year; int month; int day; }Date; typedef stuct { int hour; int minute; int second; }Time; typedef struct { Date date; Time time;原创 2012-02-21 17:58:10 · 762 阅读 · 0 评论 -
计算某一天是星期几
转自:Zeller(计算某一天是星期几) http://www.cppblog.com/zhaoyao91/archive/2011/04/03/143357.html 输入三个参数分别表示年、月、日,返回一个int数字,代表这一天是星期几。计算过程采用蔡勒公式。其中Monday = 1, Sunday = 7 #ifndef ZELLER_H #define ZELLER_H转载 2012-02-21 15:24:10 · 313 阅读 · 0 评论