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