Last updated: 2023-03-16.
tf_quant_finance.datetime.utils.days_in_leap_years_between#
Calculates number of days between two dates that fall on leap years.
tf_quant_finance.datetime.utils.days_in_leap_years_between(
start_date, end_date
)
‘start_date’ is included and ‘end_date’ is excluded from the period.
For example, for dates 2019-12-24 and 2024-2-10 the result is
406: 366 days in 2020, 31 in Jan 2024 and 9 in Feb 2024.
If end_date is earlier than start_date, the result will be negative or
zero.
Args:#
start_date: DateTensor.end_date: DateTensor compatible withstart_date.
Returns:#
Tensor of type ‘int32’.