Skip to content

Commit

Permalink
Merge pull request #332 from kentonself/dev
Browse files Browse the repository at this point in the history
Update market_calendar.py
  • Loading branch information
rsheftel authored Feb 17, 2024
2 parents 25071c5 + 57598f1 commit 1686666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas_market_calendars/market_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def open_at_time(self, schedule, timestamp, include_close=False, only_rth=False)

# When post follows market_close, market_close should not be considered a close
day.loc[day.eq("market_close") & day.shift(-1).eq("post")] = "market_open"
day = day.replace(self.open_close_map)
day = day.map(lambda x : self.open_close_map.get(x) if x in self.open_close_map.keys() else x)

if include_close:
below = day.index < timestamp
Expand Down

0 comments on commit 1686666

Please sign in to comment.