⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 td.h

📁 是一个手机功能的模拟程序
💻 H
📖 第 1 页 / 共 2 页
字号:
   {26,9,8,23},{25,10,9,24},{24,11,8,23},{23,12,7,22},
//2004
   {22,1,6,21},{20,2,4,19},{21,2,5,20},{19,3,4,20},
   {19,4,5,21},{18,5,5,21},{17,6,7,22},{16,7,7,23},
   {14,8,7,23},{14,9,8,23},{12,10,7,22},{12,11,7,21},
//2005
   {10,12,5,20},{9,1,4,18},{10,2,5,20},{9,3,5,20},
   {8,4,5,21},{7,5,5,21},{6,6,7,23},{5,7,7,23},
   {4,8,7,23},{3,9,8,23},{2,10,7,22},{1,11,7,22},
//2006
   {29,1,5,20},{28,2,4,19},{29,3,6,21},{28,4,5,20},
   {27,5,5,21},{26,6,6,21},{25,7,7,23},{24,7,7,23},
   {22,8,8,23},{22,9,8,23},{21,10,7,22},{20,11,7,22},
//2007
   {19,12,6,20},{18,1,4,19},{19,2,6,21},{17,3,5,20},
   {17,4,6,21},{15,5,6,22},{14,6,7,23},{13,7,8,23},
   {11,8,8,23},{11,9,9,24},{10,10,8,23},{10,11,7,22},
//2008
   {8,12,6,21},{7,1,4,19},{8,2,5,20},{6,3,4,20},
   {5,4,5,21},{4,5,5,21},{3,6,7,22},{1,7,7,23},
   {29,9,7,22},{29,10,8,23},{28,11,7,22},{27,12,7,21},
//2009
   {26,1,5,20},{25,2,4,18},{27,3,5,20},{25,4,4,20},
   {24,5,5,21},{23,5,5,21},{22,6,7,23},{20,7,7,23},
   {19,8,7,23},{18,9,8,23},{17,10,7,22},{16,12,7,22},
//2010
   {15,12,5,20},{14,1,4,19},{16,2,6,21},{14,3,5,20},
   {14,4,5,21},{12,5,6,21},{12,6,7,23},{10,7,7,23},
   {8,8,8,23},{8,9,8,23},{6,10,7,22},{6,11,7,22},
//2011
   {4,12,6,20},{3,1,4,19},{5,2,6,21},{3,3,5,20},
   {3,4,6,21},{2,5,6,22},{1,6,7,23},{29,8,8,23},
   {27,9,8,23},{27,10,8,24},{25,11,8,23},{25,12,7,22},
//2012
   {23,1,6,21},{22,2,4,19},{22,3,5,20},{21,4,4,20},
   {21,4,5,20},{19,5,5,21},{19,6,7,22},{17,7,7,23},
   {16,8,7,22},{15,9,8,23},{14,10,7,22},{13,11,7,21},
//2013
   {12,12,5,20},{10,1,4,18},{12,2,5,20},{10,3,4,20},
   {10,4,5,21},{8,5,5,21},{8,6,7,22},{7,7,7,23},
   {5,8,7,23},{5,9,8,23},{3,10,7,22},{3,11,7,22},
//2014
   {1,12,5,20},{0,0,4,19},{1,2,6,21},{29,4,5,20},
   {29,5,5,21},{27,6,6,21},{27,7,7,23},{25,8,7,23},
   {24,9,8,23},{24,9,8,23},{22,10,7,22},{22,11,7,22},
//2015
   {20,12,6,20},{19,1,4,19},{20,2,6,21},{19,3,5,20},
   {18,4,6,21},{16,5,6,22},{16,6,7,23},{14,7,8,23},
   {13,8,8,23},{13,9,8,24},{12,10,8,22},{11,11,7,22},
//2016
   {10,12,6,20},{8,1,4,19},{9,2,5,20},{7,3,4,19},
   {7,4,5,20},{5,5,5,21},{4,6,7,22},{3,7,7,23},
   {1,8,7,22},{1,9,8,23},{29,11,7,22},{29,12,7,21},
//2017
   {28,1,5,20},{26,2,3,18},{28,3,5,20},{26,4,4,20},
   {26,5,5,21},{24,6,5,21},{23,6,7,22},{22,7,7,23},
   {20,8,7,23},{20,9,8,23},{18,10,7,22},{18,11,7,22},
//2018
   {17,12,5,20},{16,1,4,19},{17,2,5,21},{16,3,5,20},
   {15,4,5,21},{14,5,6,21},{13,6,7,23},{11,7,7,23},
   {10,8,8,23},{9,9,8,23},{8,10,7,22},{7,11,7,22},
//2019
   {6,12,5,20},{5,1,4,19},{6,2,6,21},{5,3,5,20},
   {5,4,6,21},{3,5,6,21},{3,6,7,23},{1,7,8,23},
   {29,9,8,23},{28,10,8,24},{26,11,8,22},{26,12,7,22},
//2020
   {25,1,6,20},{23,2,4,19},{24,3,5,20},{23,4,4,19},
   {23,4,5,20},{21,5,5,21},{21,6,6,22},{19,7,7,22},
   {17,8,7,22},{17,9,8,23},{15,10,7,22},{15,11,7,21},
//2021
   {13,12,5,20},{12,1,3,18},{13,2,5,20},{12,3,4,20},
   {12,4,5,21},{10,5,5,21},{10,6,7,22},{8,7,7,23},
   {7,8,7,23},{6,9,8,23},{5,10,7,22},{4,11,7,21},
//2022
   {3,12,5,20},{1,1,4,19},{3,2,5,20},{1,3,5,20},
   {1,4,5,21},{29,6,6,21},{29,7,7,23},{27,8,7,23},
   {26,9,7,23},{25,10,8,23},{24,11,7,22},{23,12,7,22},
//2023
   {22,1,5,20},{20,2,4,19},{22,2,6,21},{20,3,5,20},
   {20,4,6,21},{17,5,6,21},{18,6,7,23},{16,7,8,23},
   {15,8,8,23},{15,9,8,24},{13,10,8,22},{13,11,7,22},
//2024
   {11,12,6,20},{10,1,4,19},{10,2,5,20},{9,3,4,19},
   {8,4,5,20},{6,5,5,21},{6,6,6,22},{4,7,7,22},
   {3,8,7,22},{3,9,8,23},{1,10,7,22},{1,11,6,21},
//2025
   {29,1,5,20},{28,2,3,18},{29,3,5,20},{28,4,4,20},
   {27,5,5,21},{25,6,5,21},{25,6,7,22},{23,7,7,23},
   {22,8,7,23},{21,9,8,23},{20,10,7,22},{20,11,7,21},
//2026
   {19,12,5,20},{17,1,4,18},{19,2,5,20},{17,3,5,20},
   {18,4,6,21},{15,5,5,21},{14,6,7,23},{13,7,7,23},
   {11,8,7,23},{10,9,8,23},{9,10,7,22},{9,11,7,22},
//2027
   {8,12,5,20},{6,1,4,19},{8,2,6,21},{7,3,5,20},
   {6,4,6,21},{5,5,6,21},{4,6,7,23},{2,7,8,23},
   {1,8,8,23},{29,10,8,23},{28,11,7,22},{28,12,7,22},
//2028
   {26,1,6,20},{25,2,4,19},{26,3,5,20},{25,4,4,19},
   {24,5,5,20},{23,5,5,21},{22,6,6,22},{20,7,7,22},
   {19,8,7,22},{18,9,8,23},{16,10,7,22},{16,11,6,21},
//2029
   {15,12,5,20},{13,1,3,18},{15,2,5,20},{14,3,4,20},
   {13,4,5,21},{12,5,5,21},{11,6,7,22},{10,7,7,23},
   {8,8,7,23},{8,9,8,23},{6,10,7,22},{5,11,7,21},
//2030
   {4,12,5,20},{2,1,4,18},{4,2,5,20},{3,3,5,20},
   {2,4,5,21},{1,5,5,21},{1,6,7,23},{29,8,7,23},
   {27,9,7,23},{27,10,8,23},{25,11,7,22},{25,12,7,22},
//2031
   {23,1,5,20},{21,2,4,19},{23,3,6,21,},{22,3,5,20},
   {21,4,6,21},{20,5,6,21},{19,6,7,23},{18,7,8,23},
   {17,8,8,23},{16,9,8,23},{15,10,7,22},{14,11,7,22}
};

//holiday //
//for example:Jan 1st is the new year's day//

static HOLIDAY Holiday[12]=
{
   {1,   1, "\x80\x51\x43\x65\xe6\x82\x82\x00\x00"},//"元旦节"
   {2,   14,   "\x80\x60\xc5\x4e\xba\x82\x82\x00\x00"},//"情人节"
   {3,   8, "\x80\x59\x87\x59\x73\x82\x82\x00\x00"},//"妇女节"
   {4,   1, "\x80\x61\x1a\x4e\xba\x82\x82\x00\x00"},//"愚人节"
   {5,   1, "\x80\x52\xb3\x52\xa8\x82\x82\x00\x00"},//"劳动节"
   {5,   4, "\x80\x97\x52\x5e\x74\x82\x82\x00\x00"},//"青年节"
   {6,   1, "\x80\x51\x3f\x7a\xe5\x82\x82\x00\x00"},//"儿童节"
   {7,   1, "\x80\x51\x5a\x5e\xfa\x65\xe5\x00\x00"},//"党建日"
   {8,   1, "\x80\x5e\xfa\x51\x9b\x82\x82\x00\x00"},//"建军节"
   {9,   10,   "\x80\x65\x59\x5e\x08\x82\x82\x00\x00"},//"教师节"
   {10, 1,  "\x80\x56\xfd\x5e\x86\x82\x82\x00\x00"},//"国庆节"
   {12, 25, "\x80\x57\x23\x8b\xde\x82\x82\x00\x00"}//"圣诞节"
};

//lunar holiday//

static HOLIDAY HolidayL[6]=
{
   {1,   1, "\x80\x66\x25\x82\x82\x00\x00"},//"春节"
   {1,   15,   "\x80\x51\x43\x5b\xb5\x82\x82\x00\x00"},//"元宵节"
   {5,   5, "\x80\x7a\xef\x53\x48\x82\x82\x00\x00"},//"端午节"
   {7, 7,   "\x80\x4e\x03\x59\x15\x00\x00"},//七夕
   {8,   15,   "\x80\x4e\x2d\x79\xcb\x82\x82\x00\x00"},//"中秋节"
   {9,   9, "\x80\x91\xcd\x96\x33\x82\x82\x00\x00"}//"重阳节"
};

//following structs or variables are defined for time_date,zhonghz,2002/6/22
typedef struct
{
   short day;//range of day is 1~28,29,30,31;
   short hour;//range of hour is 0~23;
   short minute;//range of minute is 0~59;
   char solartxt[20];//calendar txt;
} SOLAR;//solar term
typedef struct
{
   short day;//range of day is 1~28,29,30,31;
   short hour;//range of hour is 0~23;
   short minute;//range of minute is 0~59;
   char caltxt[20];//calendar txt;
} CALENDAR;
typedef struct
{
   int year;//range is 1950~2049, total 100 years.
   short month;//range of month is 1~12;
   short day;//range of day is 1~28,29,30,31;
   short hour;//range of hour is 0~23;
   short minute;//range of minute is 0~59;
   short second;//range of second is 0~59;
   short week;//range of week is 1~7;
   //int l_year;//lunar year; it's not necessary
   char  l_year[16];
   short l_month;//lunar month;0xNM form,if N !=0, the l_month is leap month;
   short l_day;//lunar day;
   char timetxt[20];//the txt is"yyyy-mm-dd,\nlunar year",year-month-day-minute-second;
   //Also the timetxt can use for comparing each other
   char holiday_txt[10];//the text is solar holiday; 
   char holidayl_txt[10];//the text is lunar holiday;
} TIMEDATE;
typedef struct
{
   int year;
   short month;
   short day;
   short lenth;//the lenth of month;
   short firstday;//which day in week is the first day of the month;
   int l_firstday;//which lunar day is the first day in the month;
   int l_midday[2];//the date of lunar month change,0xNNLM;
   //NN is the day which lunar month change,if L!=0,the month is leap month;M is which lunar month; 
   //"2" means the lunar month maybe change twice;
   SOLAR solar[2];//24 solar term in lunar;
   //"2" means that a month have two solar;
   char datetxt[60];//text,"yyyy-mm-dd";
   CALENDAR calendar[31];//calendar table, "31" means the max calendar is 31;
} MONTHTABLE;

typedef struct
{
   int year;
   int month;
   int day;
}week_date;

typedef struct
{
   int year;
   int second;
   int month;
   int day;
   int hour;
   int minute;
}date_time_minute;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -