Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I think the first year should be 1 year, not 0 year.Because we don't know the 0 year is or not a leap year.Even though we assume that the 0 year is a leap year,the original code has an error output of Date d1(365) and Date d2(366).What's more,when calculating some days after a date, the result is not correct due to this error.For example, 150 days after 2016/8/4 is 2017/1/1, While the result is 2017/1/2. At last, I have a question why the output of 'cout<<Date d()' is 1 not the default 1/1/1?
- Loading branch information