public Plus ( Interval interval ) : Date | ||
interval | Interval | The time |
Résultat | Date |
/// <summary> /// Tests if the payment date falls on a calculated date. /// </summary> /// <param name="paymentDate">The payment date.</param> /// <param name="startDate">The calculation period start date.</param> /// <param name="endDate">The calculation perion end date.</param> /// <param name="freq"> The period frequency.</param> /// <returns><c>true</c> if the payment date falls on a calculated date.</returns> private static bool IsUnadjustedCalculationPeriodDate(Date paymentDate, Date startDate, Date endDate, Interval freq) { Interval step = new Interval (0, Period.DAY); for (;;) { Date targetDate = startDate.Plus (step); if (targetDate.CompareTo (endDate) > 0) return (false); if (targetDate.Equals (paymentDate)) return (true); step = step.Plus (freq); } }