deephaven.calendar¶
This module defines functions for working with business calendars.
- add_calendar(cal)[source]¶
Adds a new business calendar to the set of available options.
- Parameters:
cal (Union[BusinessCalendar, str]) – business calendar or a path to a business calendar file
- Raises:
DHError –
- Return type:
None
- calendar(name=None)[source]¶
Returns the calendar with the given name.
The returned calendar is an ‘io.deephaven.time.calendar.BusinessCalendar’ Java object that can be used in Python. For details on the available methods, see https://deephaven.io/core/javadoc/io/deephaven/time/calendar/BusinessCalendar.html. These methods must be called with string arguments or with Java date-time objects. To convert Python date-time objects to Java date-time objects, use the conversion functions in the ‘deephaven.time’ module.
- calendar_name()[source]¶
Returns the default business calendar name.
The default business calendar is set by the ‘Calendar.default’ property or by calling ‘set_calendar’.
- Return type:
str
- Returns:
the default business calendar name
- Raises:
DHError –
- calendar_names()[source]¶
Returns the names of all available calendar names.
- Return type:
List
[str
]- Returns:
a list of all available calendar names
- Raises:
DHError –