Commit 66c236d5 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 数据库删除以前数据时,月份减法出错。 导致12月 肯定会错!!!

parent 4c8091dd
......@@ -331,9 +331,7 @@ namespace SQLite
return;//no datas
DateTime curr_month = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
int curr_total_month = curr_month.Year * 12 + curr_month.Month;
int limit_total_month = curr_total_month - month;
DateTime limit_month = new DateTime( limit_total_month/12, limit_total_month % 12, 1);
DateTime limit_month = curr_month.AddMonths(-month);
DateTime start_month = firstTimes.Min();
start_month = new DateTime(start_month.Year, start_month.Month, 1);
if (start_month < limit_month)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment