博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
期中考试
阅读量:4557 次
发布时间:2019-06-08

本文共 702 字,大约阅读时间需要 2 分钟。

1 #include "date.h" 2 #include "utils.h"  3 #include 
4 using std::cout; 5 using std::endl; 6 Date::Date() 7 { 8 year=1970; 9 month=1;10 day=1;11 }12 Date::Date(int y,int m,int d)13 {14 year=y;15 month=m;16 day=d;17 }18 int Date::getYear() const19 {20 return year;21 }22 int Date::getMonth() const23 {24 return month;25 }26 int Date::getDay() const27 {28 return day;29 }30 int Date::dayOfYear()31 {32 int a[12]={
31,28,31,30,31,30,31,31,30,31,30,31};33 if( (year % 4 == 0 && year % 100 !=0) || (year % 400 == 0) )34 {35 a[1]=29;36 }37 int i,sum=0;38 for(i=0;i

 

转载于:https://www.cnblogs.com/0122Frank/p/10795955.html

你可能感兴趣的文章
STL中排序函数的用法(Qsort,Sort,Stable_sort,Partial_sort,List::sort)
查看>>
如何解决php 生成验证码图片不显示问题
查看>>
PHP,javascript实现大文件上传
查看>>
c#图像处理算法学习
查看>>
webApi之FromUri和FromBody区别
查看>>
【SoapUI】http接口测试
查看>>
各种工具网站
查看>>
数据库事务
查看>>
xe7 控件升级
查看>>
TFrame bug
查看>>
刚学习的如何才能自信的拍美美的婚纱照呢(要结婚啦)
查看>>
M51文件注释
查看>>
关于临界资源访问互斥量的死锁问题
查看>>
django-view层
查看>>
异步加载JS的方法。
查看>>
golang-gorm框架支持mysql json类型
查看>>
【tool】白盒测试
查看>>
图论其一:图的存储
查看>>
20180923-WebService
查看>>
z变换
查看>>