Skip to content

Commit 062a65f

Browse files
committed
BUG: reference the FED calendar correctly. (#144)
Co-authored-by: Mike Lync <[email protected]> (cherry picked from commit 2d1333f66cc8bfa2395cfecec5640cb858497cd8)
1 parent bc81200 commit 062a65f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

python/tests/scheduling/test_calendars.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,3 +668,8 @@ def test_next_imm_depr():
668668
def test_get_imm_depr():
669669
with pytest.warns(DeprecationWarning):
670670
get_imm(3, 2000, definition="imm")
671+
672+
673+
def test_fed_nyc_good_friday():
674+
assert not get_calendar("nyc").is_bus_day(dt(2024, 3, 29))
675+
assert get_calendar("fed").is_bus_day(dt(2024, 3, 29))

rust/scheduling/calendars/named/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub mod bus;
66
pub mod ldn;
77
pub mod mum;
88
pub mod nyc;
9+
pub mod fed;
910
pub mod osl;
1011
pub mod stk;
1112
pub mod syd;
@@ -25,7 +26,7 @@ pub(crate) fn get_weekmask_by_name(name: &str) -> Result<Vec<u8>, PyErr> {
2526
("all", all::WEEKMASK),
2627
("bus", bus::WEEKMASK),
2728
("nyc", nyc::WEEKMASK),
28-
("fed", nyc::WEEKMASK),
29+
("fed", fed::WEEKMASK),
2930
("tgt", tgt::WEEKMASK),
3031
("ldn", ldn::WEEKMASK),
3132
("stk", stk::WEEKMASK),
@@ -51,7 +52,7 @@ pub(crate) fn get_holidays_by_name(name: &str) -> Result<Vec<NaiveDateTime>, PyE
5152
("all", all::HOLIDAYS),
5253
("bus", bus::HOLIDAYS),
5354
("nyc", nyc::HOLIDAYS),
54-
("fed", nyc::HOLIDAYS),
55+
("fed", fed::HOLIDAYS),
5556
("tgt", tgt::HOLIDAYS),
5657
("ldn", ldn::HOLIDAYS),
5758
("stk", stk::HOLIDAYS),
@@ -80,7 +81,7 @@ pub(crate) fn get_holidays_by_name(name: &str) -> Result<Vec<NaiveDateTime>, PyE
8081
// ("all", all::RULES),
8182
// ("bus", bus::RULES),
8283
// ("nyc", nyc::RULES),
83-
// ("fed", nyc::RULES),
84+
// ("fed", fed::RULES),
8485
// ("tgt", tgt::RULES),
8586
// ("ldn", ldn::RULES),
8687
// ("stk", stk::RULES),

0 commit comments

Comments
 (0)