<!--
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" />
<meta itemprop="path" content="Stable" />
</div>

# Module: tf_quant_finance.datetime

<!-- 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/__init__.py">View source</a>



Date-related utilities.



## Modules

[`periods`](../tf_quant_finance/datetime/periods.md) module: Date periods.

[`utils`](../tf_quant_finance/datetime/utils.md) module: Utilities for working with dates.

## Classes

[`class BusinessDayConvention`](../tf_quant_finance/datetime/BusinessDayConvention.md): Conventions that determine how to roll dates that fall on holidays.

[`class BusinessDaySchedule`](../tf_quant_finance/datetime/BusinessDaySchedule.md): Generates schedules containing every business day in a period.

[`class DateTensor`](../tf_quant_finance/datetime/DateTensor.md): Represents a tensor of dates.

[`class HolidayCalendar`](../tf_quant_finance/datetime/HolidayCalendar.md): Represents a holiday calendar.

[`class Month`](../tf_quant_finance/datetime/Month.md): Months. Values are one-based.

[`class PeriodTensor`](../tf_quant_finance/datetime/PeriodTensor.md): Represents a tensor of time periods.

[`class PeriodType`](../tf_quant_finance/datetime/PeriodType.md): Periods that can be added or subtracted from DateTensors.

[`class PeriodicSchedule`](../tf_quant_finance/datetime/PeriodicSchedule.md): Defines an array of dates specified by a regular schedule.

[`class WeekDay`](../tf_quant_finance/datetime/WeekDay.md): Named days of the week. Values are zero-based with Monday = 0.

[`class WeekendMask`](../tf_quant_finance/datetime/WeekendMask.md): Provides weekend masks for some of the common weekend patterns.

## Functions

[`convert_to_date_tensor(...)`](../tf_quant_finance/datetime/convert_to_date_tensor.md): Converts supplied data to a `DateTensor` if possible.

[`create_holiday_calendar(...)`](../tf_quant_finance/datetime/create_holiday_calendar.md): Creates a holiday calendar.

[`dates_from_datetimes(...)`](../tf_quant_finance/datetime/dates_from_datetimes.md): Creates DateTensor from a sequence of Python datetime objects.

[`dates_from_np_datetimes(...)`](../tf_quant_finance/datetime/dates_from_np_datetimes.md): Creates DateTensor from a Numpy array of dtype datetime64.

[`dates_from_ordinals(...)`](../tf_quant_finance/datetime/dates_from_ordinals.md): Creates DateTensor from tensors of ordinals.

[`dates_from_tensor(...)`](../tf_quant_finance/datetime/dates_from_tensor.md): Creates DateTensor from a single tensor containing years, months and days.

[`dates_from_tuples(...)`](../tf_quant_finance/datetime/dates_from_tuples.md): Creates DateTensor from a sequence of year-month-day Tuples.

[`dates_from_year_month_day(...)`](../tf_quant_finance/datetime/dates_from_year_month_day.md): Creates DateTensor from tensors of years, months and days.

[`daycount_actual_360(...)`](../tf_quant_finance/datetime/daycount_actual_360.md): Computes the year fraction between the specified dates.

[`daycount_actual_365_actual(...)`](../tf_quant_finance/datetime/daycount_actual_365_actual.md): Computes the year fraction between the specified dates.

[`daycount_actual_365_fixed(...)`](../tf_quant_finance/datetime/daycount_actual_365_fixed.md): Computes the year fraction between the specified dates.

[`daycount_actual_actual_isda(...)`](../tf_quant_finance/datetime/daycount_actual_actual_isda.md): Computes the year fraction between the specified dates.

[`daycount_thirty_360_isda(...)`](../tf_quant_finance/datetime/daycount_thirty_360_isda.md): Computes the year fraction between the specified dates.

[`random_dates(...)`](../tf_quant_finance/datetime/random_dates.md): Generates random dates between the supplied start and end dates.

