Calculates the fraction of the year represented by the number of whole days between two dates.
Эта функция в Google Таблицах работает так же, как в Excel — тот же синтаксис и аргументы.
YEARFRAC(start_date, end_date, [basis])The YEARFRAC function is used to identify the proportion of a year between a start date and an end date. It is commonly used to calculate accrued interest or other financial metrics that rely on time periods.
=YEARFRAC("2023-01-01", "2023-07-01", 1)Результат: 0.49589
Calculates the fraction of the year for the first half of 2023 using the actual/actual basis.
It determines how the number of days in a year is calculated, which affects the final fraction.