public TenorTimeSpan GetTimeSpanInBetween_TestCase(DateTime startDate, DateTime endDate, TenorTimeSpan.RoundingRule roundingRule) { return(TenorTimeSpan.GetTimeSpanInBetween(startDate, endDate, roundingRule)); }
/// <summary>Gets the start and end date of the timeframe as well as a <see cref="TenorTimeSpan" /> representation of the time span between both dates. /// </summary> /// <param name="referenceDate">A reference date (can be a business day or a holiday).</param> /// <param name="holidayCalendar">The (settlement) holiday calendar.</param> /// <param name="startDate">The start date of the time span with respect to referenceDate (output).</param> /// <param name="endDate">The end date of the time span with respect to referenceDate (output).</param> /// <param name="tenor">The tenor that represents the time span; if the end date of the current object is not specified by its <see cref="TenorTimeSpan" /> /// representation, <paramref name="tenorRoundingRule" /> will be applied to <paramref name="startDate" /> and <paramref name="endDate" /> for the calculation of a <see cref="TenorTimeSpan" /> representation.</param> /// <param name="tenorRoundingRule">A rounding rule which will be take into account if and only if the end date of the current object is not specified by its <see cref="TenorTimeSpan" /> representation.</param> /// <param name="logger">An optional logger.</param> public void GetStartAndEndDate(DateTime referenceDate, IHolidayCalendar holidayCalendar, out DateTime startDate, out DateTime endDate, out TenorTimeSpan tenor, TenorTimeSpan.RoundingRule tenorRoundingRule = TenorTimeSpan.RoundingRule.NearestMonth, ILogger logger = null) { GetStartAndEndDate(referenceDate, holidayCalendar, out startDate, out endDate, logger); tenor = TenorTimeSpan.GetTimeSpanInBetween(startDate, endDate, tenorRoundingRule); }