pandas-market-calendars 4.6.0__py3-none-any.whl → 4.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,15 +15,14 @@
15
15
 
16
16
  from datetime import time
17
17
  from itertools import chain
18
+ from typing import Literal, Union
18
19
 
19
20
  import pandas as pd
20
21
  from pandas.tseries.holiday import AbstractHolidayCalendar
21
22
  from pandas.tseries.offsets import CustomBusinessDay
22
23
  from pytz import timezone
23
24
 
24
- from typing import Literal, Union
25
25
  from pandas_market_calendars import calendar_utils as u
26
-
27
26
  from pandas_market_calendars.holidays.nyse import (
28
27
  # Always Celebrated Holidays
29
28
  USNewYearsDayNYSEpost1952,
@@ -1306,8 +1305,10 @@ class NYSEExchangeCalendar(MarketCalendar):
1306
1305
  :param tz: time zone in either string or pytz.timezone
1307
1306
  :return: DatetimeIndex of valid business days
1308
1307
  """
1309
- start_date = pd.Timestamp(start_date, tz=tz)
1310
- end_date = pd.Timestamp(end_date, tz=tz)
1308
+ start_date = pd.Timestamp(start_date)
1309
+ end_date = pd.Timestamp(end_date)
1310
+ start_date = start_date.tz_convert(tz) if start_date.tz else start_date.tz_localize(tz)
1311
+ end_date = end_date.tz_convert(tz) if end_date.tz else end_date.tz_localize(tz)
1311
1312
 
1312
1313
  # Starting Monday Sept. 29, 1952, no more saturday trading days
1313
1314
  if tz is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pandas_market_calendars
3
- Version: 4.6.0
3
+ Version: 4.6.1
4
4
  Summary: Market and exchange trading calendars for pandas
5
5
  Author-email: Ryan Sheftel <rsheftel@alumni.upenn.edu>
6
6
  License: MIT
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
- Requires-Python: >=3.8
22
+ Requires-Python: >=3.9
23
23
  Description-Content-Type: text/x-rst
24
24
  License-File: LICENSE
25
25
  License-File: NOTICE
@@ -24,7 +24,7 @@ pandas_market_calendars/calendars/iex.py,sha256=xBqnv_H4GZ0qceSv-yVmKRZRT3F-_UJh
24
24
  pandas_market_calendars/calendars/jpx.py,sha256=uiAtxgXGZAzxM3lxGvVOoIwKvd4gsZTYupTIKoLzn0k,3819
25
25
  pandas_market_calendars/calendars/lse.py,sha256=qltdB1TdQ3F8jqx4oykzy_cZvqHlHwnsrpRXzBsovVc,3114
26
26
  pandas_market_calendars/calendars/mirror.py,sha256=Oq9jRXYpKmPv6PfoKDVVLyIG7hqcuFFC7fPLcCIhl7k,4555
27
- pandas_market_calendars/calendars/nyse.py,sha256=mQMKGtgiyafGQr69TjvZpnt9f_IjrM5lFk4Rl9T_4do,66012
27
+ pandas_market_calendars/calendars/nyse.py,sha256=7-Yfdi-2aSQbIJn8TozkXfK8XsQtVreA-ko0Dr2Wips,66181
28
28
  pandas_market_calendars/calendars/ose.py,sha256=AfF11QxKYwozaaEc2PvuP3IPvVj5D70mIl0zyp5OogE,2938
29
29
  pandas_market_calendars/calendars/sifma.py,sha256=RgOX1yhT8-b6w029ILkOhU-delPCeX6uNWoWDm1Z0eE,9960
30
30
  pandas_market_calendars/calendars/six.py,sha256=RYShBBuHg6O5QrMnTmdboInh0Wy5bBNRC9dR-QH9PO8,2610
@@ -42,9 +42,9 @@ pandas_market_calendars/holidays/oz.py,sha256=P77pWe7ZQj4o-731w6fW_Vzmo41PRxh94Q
42
42
  pandas_market_calendars/holidays/sifma.py,sha256=gELES9-NeV3QNGE4JpsVfmcs1-jtYQrLxjnG4B-4RmM,8754
43
43
  pandas_market_calendars/holidays/uk.py,sha256=dt5TNONlDMXPw8wjyyPBYNnLO5Yz6Mht8VrPUrNqy-M,4719
44
44
  pandas_market_calendars/holidays/us.py,sha256=OBBMMKTRzghD-b9CmPRe5zBh7zQYjWl4-9SogT6ZnBo,11515
45
- pandas_market_calendars-4.6.0.dist-info/LICENSE,sha256=qW51_A-I7YutlB-s8VSKeOP-aL83T-Lb8LqqU1x1ilw,1065
46
- pandas_market_calendars-4.6.0.dist-info/METADATA,sha256=ash0v3KB8sWrQWS0RPCEDGTUfGyDdAU28MdLApcCx6s,9477
47
- pandas_market_calendars-4.6.0.dist-info/NOTICE,sha256=mmH7c9aF5FsELh1OHXloXw1TajLD_mWDKO4dsVf43_E,11693
48
- pandas_market_calendars-4.6.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
49
- pandas_market_calendars-4.6.0.dist-info/top_level.txt,sha256=_4cUEFr07SuEAzZMT-5p0lJGXxO9imVbEK9_5oqcopQ,24
50
- pandas_market_calendars-4.6.0.dist-info/RECORD,,
45
+ pandas_market_calendars-4.6.1.dist-info/LICENSE,sha256=qW51_A-I7YutlB-s8VSKeOP-aL83T-Lb8LqqU1x1ilw,1065
46
+ pandas_market_calendars-4.6.1.dist-info/METADATA,sha256=4xcQyj-mUDdl65hv9fmfGcs-dCBvoutznUFV2X-5jDc,9477
47
+ pandas_market_calendars-4.6.1.dist-info/NOTICE,sha256=mmH7c9aF5FsELh1OHXloXw1TajLD_mWDKO4dsVf43_E,11693
48
+ pandas_market_calendars-4.6.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
49
+ pandas_market_calendars-4.6.1.dist-info/top_level.txt,sha256=_4cUEFr07SuEAzZMT-5p0lJGXxO9imVbEK9_5oqcopQ,24
50
+ pandas_market_calendars-4.6.1.dist-info/RECORD,,