#ifndef __INC_PUBLHEAD_H__
#define __INC_PUBLHEAD_H__
//-----------------------------------------------------------------------------
#include <stdio.h>
#include "PublType.h"
//-----------------------------------------------------------------------------
#endif
#ifndef __INC_PUBLTYPE_H__
#define __INC_PUBLTYPE_H__
//-----------------------------------------------------------------------------
typedef char String; // 字符串型
typedef unsigned int Boolean; // 布尔型
typedef unsigned char UFix08; // 无符号 8 位
typedef unsigned short int UFix16; // 无符号 16 位
typedef unsigned long int UFix32; // 无符号 32 位
typedef signed char SFix08; // 带符号 8 位
typedef signed short int SFix16; // 带符号 16 位
typedef signed long int SFix32; // 带符号 32 位
typedef unsigned int UAuto08; // 无符号 至少 8 位
typedef unsigned int UAuto16; // 无符号 至少 16 位
typedef unsigned long UAuto32; // 无符号 至少 32 位
typedef signed char SAuto08; // 带符号 至少 8 位
typedef signed int SAuto16; // 带符号 至少 16 位
typedef signed long SAuto32; // 带符号 至少 32 位
//-----------------------------------------------------------------------------
#endif
#include "PublHead.h"
typedef struct
{
UAuto32 year; // 年(0000~65535)
UAuto08 month; // 月(1~12)
UAuto08 day; // 日(1~31)
} STR_DTTM;
// 判断是否是闰年(公元历法)
// 闰年判断方法: 能被4整除且不能被100整除 或 能被400整除
static Boolean IsLeapYear(UAuto32 y)
{
return ((((y % 4) == 0) && ((y % 100) != 0)) || ((y % 400) == 0)) ? 1 : 0;
}
static const UAuto16 day_of_month[2][13] =
{
{
0, 31, 59, 90,

最低0.47元/天 解锁文章
461

被折叠的 条评论
为什么被折叠?



