计算最后支付时间

static DateTime pay_end(DateTime cur_date)
{
DateTime start_date = DateTime.Parse("1999-05-03"); 
int time_diff = (cur_date - start_date).Days; 
int pay_periods = (int)(time_diff / 14.0D); 
if (Math.Ceiling(time_diff / 14.0D) == 0)
return start_date.AddDays(pay_periods * 14); 
return start_date.AddDays((pay_periods + 1) * 14);
}

Mark

posted @ 2013-08-07 16:08  cnkker.com  阅读(207)  评论(0编辑  收藏  举报