自动更新程序发布日期的方法

void ConvertDate(void)
{
 char APP_DATE[]=__DATE__;
 char APP_MONTH[4];
 int APP_YEAR;
 int APP_DAILY_VERSION;
 sscanf(APP_DATE,"%s %d %d",APP_MONTH,&APP_DAILY_VERSION,&APP_YEAR);
 g_APP_YEAR_VERSION=APP_YEAR-(APP_YEAR/100)*100;
 if (strcmp(APP_MONTH,"Jan")==0)
  g_APP_MONTH_VERSION=1;
 else if (strcmp(APP_MONTH,"Feb")==0)
  g_APP_MONTH_VERSION=2;
 else if (strcmp(APP_MONTH,"Mar")==0)
  g_APP_MONTH_VERSION=3;
 else if (strcmp(APP_MONTH,"Apr")==0)
  g_APP_MONTH_VERSION=4;
 else if (strcmp(APP_MONTH,"May")==0)
  g_APP_MONTH_VERSION=5;
 else if (strcmp(APP_MONTH,"Jun")==0)
  g_APP_MONTH_VERSION=6;
 else if (strcmp(APP_MONTH,"Jul")==0)
  g_APP_MONTH_VERSION=7;
 else if (strcmp(APP_MONTH,"Aug")==0)
  g_APP_MONTH_VERSION=8;
 else if (strcmp(APP_MONTH,"Sep")==0)
  g_APP_MONTH_VERSION=9;
 else if (strcmp(APP_MONTH,"Oct")==0)
  g_APP_MONTH_VERSION=10;
 else if (strcmp(APP_MONTH,"Nov")==0)
  g_APP_MONTH_VERSION=11;
 else if (strcmp(APP_MONTH,"Dec")==0)
  g_APP_MONTH_VERSION=12;
 else
  g_APP_MONTH_VERSION=0;
 g_APP_DAILY_VERSION=APP_DAILY_VERSION;
 if (g_lost_and_freeze)
 {
  g_Set[23]=0xa;
  g_Set[24]=0x00;
 }
}

©️2020 CSDN 皮肤主题: 大白 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值