-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cal file * Update Calendar/README.md --------- Co-authored-by: margaretkennedy <82049573+margaretkennedy@users.noreply.github.com>
- Loading branch information
1 parent
7089c00
commit 21af780
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<calendar> | ||
<name>CompanyY_2024</name> | ||
<timeZone>America/New_York</timeZone> | ||
<language>en</language> | ||
<country>US</country> | ||
<firstValidDate>2024-01-01</firstValidDate> | ||
<lastValidDate>2024-12-31</lastValidDate> | ||
<description> | ||
Company Y calendar for the year 2024. | ||
Company Y uses two business periods instead of one. | ||
The periods are separated by a one hour lunch break. | ||
This calendar file defines standard business hours, weekends, and holidays. | ||
</description> | ||
<default> | ||
<businessTime><open>08:00</open><close>12:00</close><open>13:00</open><close>17:00</close></businessTime> | ||
<weekend>Saturday</weekend> | ||
<weekend>Sunday</weekend> | ||
</default> | ||
<holiday> | ||
<date>2024-01-01</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-01-15</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-02-19</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-03-29</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-04-01</date> | ||
<businessTime><open>08:00</open><close>12:00</close></businessTime> | ||
</holiday> | ||
<holiday> | ||
<date>2024-05-27</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-07-04</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-09-02</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-10-31</date> | ||
<businessTime><open>08:00</open><close>12:00</close></businessTime> | ||
</holiday> | ||
<holiday> | ||
<date>2024-11-28</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-11-29</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-12-25</date> | ||
</holiday> | ||
<holiday> | ||
<date>2024-12-26</date> | ||
</holiday> | ||
</calendar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Calendar | ||
|
||
This folder contains a calendar file in XML format. | ||
|
||
## Table of contents | ||
|
||
`CompanyY_2024.calendar`: A calendar file for a hypothetical company, `Company Y`, in XML format. | ||
|
||
## Calendar file | ||
|
||
A calendar file can be used by Deephaven's calendar API to add a custom calendar to the list of available calendars. This calendar file is used in Deephaven's documentation to show how this can be done. | ||
|
||
## Use a custom calendar | ||
|
||
Here's an example of the documentation for using a custom calendar: | ||
|
||
```python | ||
from deephaven.calendar import add_calendar, calendar, calendar_names | ||
|
||
add_calendar("https://media.githubusercontent.com/media/deephaven/examples/main/Calendar/CompanyY_2024.calendar") | ||
|
||
print(calendar_names()) | ||
|
||
company_y_cal_2024 = calendar("CompanyY_2024") | ||
``` |