Last updated: 2023-03-16.
tf_quant_finance.datetime.utils.year_month_day_to_ordinal#
Calculates ordinals Tensor given years, months and dates.
tf_quant_finance.datetime.utils.year_month_day_to_ordinal(
year, month, day
)
Args:#
year: Tensor of int32 type. Elements should be positive.month: Tensor of int32 type of same shape asyear. Elements should be in range[1, 12].day: Tensor of int32 type of same shape asyear. Elements should be in range[1, 31]and represent valid dates together with corresponding elements ofmonthandyearTensors.
Returns:#
Tensor of int32 type. Each element is number of days since 1 Jan 0001. 1 Jan
0001 has ordinal = 1.