<!--
This file is generated by a tool. Do not edit directly.
For open-source contributions the docs will be updated automatically.
-->

*Last updated: 2023-03-16.*

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_quant_finance.datetime.utils" />
<meta itemprop="path" content="Stable" />
</div>

# Module: tf_quant_finance.datetime.utils

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api" align="left">
</table>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/datetime/date_utils.py">View source</a>



Utilities for working with dates.



## Functions

[`days_in_leap_and_nonleap_years_between(...)`](../../tf_quant_finance/datetime/utils/days_in_leap_and_nonleap_years_between.md): Calculates number of days that fall on leap and non-leap years.

[`days_in_leap_years_between(...)`](../../tf_quant_finance/datetime/utils/days_in_leap_years_between.md): Calculates number of days between two dates that fall on leap years.

[`is_leap_year(...)`](../../tf_quant_finance/datetime/utils/is_leap_year.md): Calculates whether years are leap years.

[`leap_days_between(...)`](../../tf_quant_finance/datetime/utils/leap_days_between.md): Calculates number of leap days (29 Feb) between two dates.

[`ordinal_to_year_month_day(...)`](../../tf_quant_finance/datetime/utils/ordinal_to_year_month_day.md): Calculates years, months and dates Tensor given ordinals Tensor.

[`year_month_day_to_ordinal(...)`](../../tf_quant_finance/datetime/utils/year_month_day_to_ordinal.md): Calculates ordinals Tensor given years, months and dates.

