QS.YEAR.FRACTION¶
Returns the year fraction between two ISO dates
Category: QuantSupport - Time.
- QS.YEAR.FRACTION(start_date: text, end_date: text, day_counter: text) number¶
- Parameters:
start_date (text) – ISO date text in YYYY-MM-DD format
end_date (text) – ISO date text in YYYY-MM-DD format
day_counter (text) – Required day-count convention, for example Actual360, Actual365, or Thirty360; no blank-input default
- Returns:
Numeric native year fraction. ActualActual omits one intervening year when endpoint years differ by at least two; Thirty360US independently adjusts February month-ends after its 31st-day rules and is not generally US/NASD/BondBasis-equivalent.
- Return Type:
number
- Errors:
#VALUE! if either ISO date or the day-count convention cannot be parsed.
Formula¶
=QS.YEAR.FRACTION(start_date, end_date, day_counter)
Calculation¶
Thread-safe worksheet function.
Native Declaration¶
fn qs_year_fraction (start_date : & str , end_date : & str , day_counter : & str ,) -> Result < f64 , XllError >