mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-14 12:10:24 +08:00
Instead of sliding to the next trading day because of the behavior of `searchsorted`, if dt argument is not a trading day use it as a max value for corresponding date of the index. Fixes a bug where if the end of the quarter is calculated with disregard to trading days, get_index would return the first day of the next quarter, instead of the last trading day of the intended quarter.