惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
A
About on SuperTechFans
H
Help Net Security
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
WordPress大学
WordPress大学
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
C
Check Point Blog
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
I
InfoQ
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
Jina AI
Jina AI
F
Fortinet All Blogs
宝玉的分享
宝玉的分享
小众软件
小众软件
有赞技术团队
有赞技术团队
F
Full Disclosure
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Recorded Future
Recorded Future
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
量子位
U
Unit 42
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
O
OpenAI News
S
Secure Thoughts
罗磊的独立博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google Online Security Blog
Google Online Security Blog
Cloudbric
Cloudbric
W
WeLiveSecurity
IT之家
IT之家

博客园 - Sleet(冰雨)

中国免费资源站全集 论程序员与妓女 I Believe I Can Fly 开机BIOS语言一点通 开始→运行→输入的命令集锦(较全) 局域网类故障 c++程序员的爱情诗 湖北城市班级篇 众球星对Baggio的评价! 被称为世上最经典的25句话! 大学生的毕业前与毕业后 比尔盖茨死了 用VB制作一个简单的MP3播放器 用diskid.dll和disk32.dll获得硬盘序列号 春天来了(散文诗) 经典的大学学习生活心得 2004年最欠揍的短信息(转) 《我的理想女友》(转帖) BBS,你给了我那么多!(转帖)
License的C语言代码!
Sleet(冰雨) · 2005-06-17 · via 博客园 - Sleet(冰雨)

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define OVERDAY 30
long GetDateToDays(int Year,int Mon,int Day);
main()
{
   FILE *fp;
   int  Day,Mon,Year;
   long SysDays;
   long FileDays;

   time_t timep;
   struct tm *p;
   time(&timep);
   p=localtime(&timep);

   if((fp=fopen("c:\jlsj.txt","r"))==NULL)
   {
      fprintf(stderr,"error read *.txt!\n");
      exit(0);
      }
      fscanf(fp,"%d%d%d",&Year,&Mon,&Day);
      fclose(fp);


   SysDays = GetDateToDays(p->tm_year+1900,p->tm_mon,p->tm_mday);
   FileDays = GetDateToDays(Year,Mon,Day);

   if(SysDays-FileDays>=OVERDAY)
   {
 fprintf(stderr,"overday!\n");
 }
   else
 printf("inday!\n");

   printf("xitongtianshu:%ld\n",SysDays);

   printf("wenjiantianshu:%ld\n",FileDays);

  }

   long GetDateToDays(int Year,int Mon,int Day)
   {
    long Days=0;
    int  i=0,j=0;
    int  Rn[]={31,28,31,30,31,30,31,31,30,31,30,31};

    for(i=1900;i<=Year-1;i++)
    {
       if((i%4==0 && i%100!=0) || i%400==0)
       Days+=366;
       else
       Days+=365;
       }

       if((Year%4==0 && Year%100!=0) || Year%400==0)
       Rn[1]=29;
   if(Mon!=1)
   {
      for(i=0;i<Mon-2;i++)
      {
       Days+=Rn[i];
       }
       }
       Days +=Day;
       return Days;
       }

附件:/Files/welldoneyc/tc20.zip